Struct InputActionTrace.ActionEventPtr
A wrapper around Action
Namespace: UnityEngine .InputSystem .Utilities
Assembly: Unity.InputSystem.dll
Syntax
public struct InputActionTrace.ActionEventPtr
Remarks
For example, instead of returning control indices, it automatically resolves and returns the respective controls.
Properties
action
The Input
Declaration
public InputAction action { get; }
Property Value
Type | Description |
---|---|
Input |
control
The Input
Declaration
public InputControl control { get; }
Property Value
Type | Description |
---|---|
Input |
duration
The duration, in seconds, that has elapsed between when this event was generated and when the action phase transitioned to Started and has remained active.
Declaration
public double duration { get; }
Property Value
Type | Description |
---|---|
double |
interaction
The IInputnull
if the action event is not associated with an input interaction.
Declaration
public IInputInteraction interaction { get; }
Property Value
Type | Description |
---|---|
IInput |
phase
The Input
Declaration
public InputActionPhase phase { get; }
Property Value
Type | Description |
---|---|
Input |
See Also
startTime
Declaration
public double startTime { get; }
Property Value
Type | Description |
---|---|
double |
time
The time, in seconds since your game or app started, that the event occurred.
Declaration
public double time { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
Times are in seconds and progress linearly in real-time. The timeline is the same as for realtime
valueSizeInBytes
The size, in bytes, of the value associated with this action event.
Declaration
public int valueSizeInBytes { get; }
Property Value
Type | Description |
---|---|
int |
Methods
ReadValue(void*, int)
Reads the value associated with this event into the contiguous memory buffer defined by [buffer, buffer + bufferSize)
.
Declaration
public void ReadValue(void* buffer, int bufferSize)
Parameters
Type | Name | Description |
---|---|---|
void* | buffer | Pointer to the contiguous memory buffer to write value data to. |
int | bufferSize | The size, in bytes, of the contiguous buffer pointed to by |
Exceptions
Type | Condition |
---|---|
Null |
If |
Argument |
If the given |
See Also
ReadValueAsObject()
Reads the value associated with this event as an object
.
Declaration
public object ReadValueAsObject()
Returns
Type | Description |
---|---|
object |
|
See Also
ReadValue<TValue>()
Reads the value associated with this event as an object of type TValue
.
Declaration
public TValue ReadValue<TValue>() where TValue : struct
Returns
Type | Description |
---|---|
TValue | Object of type |
Type Parameters
Name | Description |
---|---|
TValue | The event value type to be used. |
Exceptions
Type | Condition |
---|---|
Invalid |
In case the size of |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |