Class InputProcessor | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class InputProcessor

    A processor that conditions/transforms input values.

    Inheritance
    System.Object
    InputProcessor
    InputProcessor<TValue>
    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 value.

    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.

    See Also

    processors
    processors
    RegisterProcessor<T>(String)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023