docs.unity.cn
    Show / Hide Table of Contents

    Class NormalizeVector2Processor

    Normalizes a Vector2 input value.

    Inheritance
    Object
    InputProcessor
    InputProcessor<Vector2>
    NormalizeVector2Processor
    Inherited Members
    InputProcessor<Vector2>.ProcessAsObject(Object, InputControl)
    InputProcessor<Vector2>.Process(Void*, Int32, InputControl)
    InputProcessor.cachingPolicy
    Namespace: UnityEngine.InputSystem.Processors
    Syntax
    public class NormalizeVector2Processor : InputProcessor<Vector2>
    Remarks

    This processor is registered (see RegisterProcessor<T>(String)) under the name "normalizeVector2".

    Methods

    Process(Vector2, InputControl)

    Normalize value. Performs the equivalent of value.normalized.

    Declaration
    public override Vector2 Process(Vector2 value, InputControl control)
    Parameters
    Type Name Description
    Vector2 value

    Input vector.

    InputControl control

    Ignored.

    Returns
    Type Description
    Vector2

    Normalized vector.

    Overrides
    UnityEngine.InputSystem.InputProcessor<UnityEngine.Vector2>.Process(UnityEngine.Vector2, UnityEngine.InputSystem.InputControl)

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    Object.ToString()

    See Also

    NormalizeVector3Processor
    Back to top Copyright © 2023 Unity Technologies
    Generated by DocFX
    on 27 March 2023
    Terms of use