Class InputProcessor
A processor that conditions/transforms input values.
Inheritance
System.Object
InputProcessor
Namespace: UnityEngine.InputSystem
Syntax
public abstract class InputProcessor
Properties
valueType
Value type expected by the processor.
Declaration
public abstract Type valueType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
Process(Void*, Int32, InputControl)
Declaration
public abstract void Process(void *buffer, int bufferSize, InputControl control)
Parameters
Type | Name | Description |
---|---|---|
System.Void* | buffer | |
System.Int32 | bufferSize | |
InputControl | control |
ProcessAsObject(Object, InputControl)
Process an input value, given as an object, and return the processed value as an object.
Declaration
public abstract object ProcessAsObject(object value, InputControl control)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | A value of type valueType. |
InputControl | control | Optional control that the value originated from. Must have the same value type that the processor has (valueType). |
Returns
Type | Description |
---|---|
System.Object | A processed value based on |
Remarks
This method allocates GC memory. To process values without allocating GC memory, it is necessary to know the value type of a processor at compile time and call Process(TValue, InputControl<TValue>) directly.