A floating-point 2D vector control composed of two AxisControl.
Inheritance
System.Object
Vector2Control
public class Vector2Control : InputControl<Vector2>
An example is position.
Debug.Log(string.Format("Mouse position x={0} y={1}",
InputSystem.GetDevice<Mouse>().position.x.value,
Inputsystem.GetDevice<Mouse>().position.y.value));
Constructors
Declaration
Properties
Horizontal position of the control.
Declaration
public AxisControl x { get; }
Property Value
Vertical position of the control.
Declaration
public AxisControl y { get; }
Property Value
Methods
Declaration
public override float EvaluateMagnitude(void *statePtr)
Parameters
Type |
Name |
Description |
System.Void* |
statePtr |
|
Returns
Type |
Description |
System.Single |
|
Overrides
Declaration
protected override void FinishSetup(InputDeviceBuilder builder)
Parameters
Overrides
Declaration
public override Vector2 ReadUnprocessedValueFromState(void *statePtr)
Parameters
Type |
Name |
Description |
System.Void* |
statePtr |
|
Returns
Overrides
UnityEngine.InputSystem.InputControl<Vector2>.ReadUnprocessedValueFromState(System.Void*)
Declaration
public override void WriteValueIntoState(Vector2 value, void *statePtr)
Parameters
Type |
Name |
Description |
Vector2 |
value |
|
System.Void* |
statePtr |
|
Overrides
UnityEngine.InputSystem.InputControl<Vector2>.WriteValueIntoState(Vector2, System.Void*)
Extension Methods