Class ScaleVector2Processor
Scale the components of a
Inherited Members
Namespace: UnityEngine.InputSystem.Processors
Syntax
public class ScaleVector2Processor : InputProcessor<Vector2>
Remarks
This processor is registered (see RegisterProcessor<T>(String)) under the name "scaleVector2".
// Double the length of the vector produced by leftStick on gamepad.
myAction.AddBinding("<Gamepad>/leftStick").WithProcessor("scaleVector2(x=2,y=2)");
Fields
x
Scale factor to apply to the vector's x
axis. Defaults to 1.
Declaration
public float x
Field Value
Type | Description |
---|---|
Single |
y
Scale factor to apply to the vector's y
axis. Defaults to 1.
Declaration
public float y
Field Value
Type | Description |
---|---|
Single |
Methods
Process(Vector2, InputControl)
Declaration
public override Vector2 Process(Vector2 value, InputControl control)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | Input value. |
InputControl | control | Ignored. |
Returns
Type | Description |
---|---|
Vector2 | Scaled vector. |
Overrides
UnityEngine.InputSystem.InputProcessor<Vector2>.Process(Vector2, UnityEngine.InputSystem.InputControl)
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |