Class InputActionTrace
Records the triggering of actions into a sequence of events that can be replayed at will.
Inheritance
System.Object
InputActionTrace
Namespace: UnityEngine.Experimental.Input
Syntax
public class InputActionTrace : IEnumerable<InputActionTrace.ActionEventPtr>, IDisposable
Remarks
This is an alternate way to the callback-based responses (such as performed) of InputAction. Instead of executing response code right away whenever an action triggers, an RecordAction(InputAction.CallbackContext) which can then be queried on demand.
Properties
buffer
Directly access the underlying raw memory queue.
Declaration
public InputEventBuffer buffer { get; }
Property Value
Type | Description |
---|---|
InputEventBuffer |
count
Declaration
public int count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Clear()
Declaration
public void Clear()
Dispose()
Declaration
public void Dispose()
GetEnumerator()
Declaration
public IEnumerator<InputActionTrace.ActionEventPtr> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<InputActionTrace.ActionEventPtr> |
RecordAction(InputAction.CallbackContext)
Record the triggering of an action as an InputActionTrace.ActionEventPtr.
Declaration
public void RecordAction(InputAction.CallbackContext context)
Parameters
Type | Name | Description |
---|---|---|
InputAction.CallbackContext | context |