Class Vector2Control
A floating-point 2D vector control composed of two AxisControl.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: UnityEngine.Experimental.Input.Controls
Syntax
public class Vector2Control : InputControl<Vector2>
Remarks
Normalization is not implied. The X and Y coordinates can be in any range or units.
Examples
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
Vector2Control()
Declaration
public Vector2Control()
Properties
x
Horizontal position of the control.
Declaration
public AxisControl x { get; }
Property Value
Type | Description |
---|---|
AxisControl |
y
Vertical position of the control.
Declaration
public AxisControl y { get; }
Property Value
Type | Description |
---|---|
AxisControl |
Methods
EvaluateMagnitude(Void*)
Declaration
public override float EvaluateMagnitude(void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
System.Void* | statePtr |
Returns
Type | Description |
---|---|
System.Single |
Overrides
FinishSetup(InputDeviceBuilder)
Declaration
protected override void FinishSetup(InputDeviceBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
InputDeviceBuilder | builder |
Overrides
ReadUnprocessedValueFromState(Void*)
Declaration
public override Vector2 ReadUnprocessedValueFromState(void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
System.Void* | statePtr |
Returns
Type | Description |
---|---|
Vector2 |
Overrides
UnityEngine.Experimental.Input.InputControl<Vector2>.ReadUnprocessedValueFromState(System.Void*)
WriteValueIntoState(Vector2, Void*)
Declaration
public override void WriteValueIntoState(Vector2 value, void *statePtr)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | value | |
System.Void* | statePtr |
Overrides
UnityEngine.Experimental.Input.InputControl<Vector2>.WriteValueIntoState(Vector2, System.Void*)