Class ScaleVector2Processor | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Class ScaleVector2Processor

    Scale the components of a by constant factors.

    Inheritance
    System.Object
    InputProcessor
    InputProcessor<Vector2>
    ScaleVector2Processor
    Inherited Members
    InputProcessor<Vector2>.valueType
    InputProcessor<Vector2>.ProcessAsObject(Object, InputControl)
    InputProcessor<Vector2>.Process(Void*, Int32, InputControl)
    Namespace: UnityEngine.InputSystem.Processors
    Syntax
    public class ScaleVector2Processor : InputProcessor<Vector2>
    Remarks
    // Double the length of the vector produced by leftStick on gamepad.
    myAction.AddBinding("<Gamepad>/leftStick").WithProcessor("scaleVector2(x=2,y=2)");

    Fields

    x

    Declaration
    public float x
    Field Value
    Type Description
    System.Single

    y

    Declaration
    public float y
    Field Value
    Type Description
    System.Single

    Methods

    Process(Vector2, InputControl<Vector2>)

    Declaration
    public override Vector2 Process(Vector2 value, InputControl<Vector2> control)
    Parameters
    Type Name Description
    Vector2 value
    InputControl<Vector2> control
    Returns
    Type Description
    Vector2
    Overrides
    UnityEngine.InputSystem.InputProcessor<Vector2>.Process(Vector2, UnityEngine.InputSystem.InputControl<Vector2>)
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX