Class DeltaControl
A control representing a two-dimensional motion vector that accumulates within a frame and resets at the beginning of a frame.
Inherited Members
Namespace: UnityEngine.InputSystem.Controls
Assembly: Unity.InputSystem.dll
Syntax
[Preserve]
public class DeltaControl : Vector2Control
Remarks
Delta controls are
Properties
down
A synthetic axis representing the lower half of the Y axis value, i.e. the -1 to 1 range (inverted).
Declaration
[Preserve]
public AxisControl down { get; set; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the control's lower half Y axis. |
Remarks
The control is marked as synthetic.
See Also
left
A synthetic axis representing the left half of the X axis value, i.e. the -1 to 1 range (inverted).
Declaration
[Preserve]
public AxisControl left { get; set; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the control's left half X axis. |
Remarks
The control is marked as synthetic.
See Also
right
A synthetic axis representing the right half of the X axis value, i.e. the 0 to 1 range.
Declaration
[Preserve]
public AxisControl right { get; set; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the control's right half X axis. |
Remarks
The control is marked as synthetic.
See Also
up
A synthetic axis representing the upper half of the Y axis value, i.e. the 0 to 1 range.
Declaration
[Preserve]
public AxisControl up { get; set; }
Property Value
Type | Description |
---|---|
AxisControl | Control representing the control's upper half Y axis. |
Remarks
The control is marked as synthetic.
See Also
Methods
FinishSetup()
Perform final initialization tasks after the control hierarchy has been put into place.
Declaration
protected override void FinishSetup()
Overrides
Remarks
This method can be overridden to perform control- or device-specific setup work. The most common use case is for looking up child controls and storing them in local getters.
public class MyDevice : InputDevice
{
public ButtonControl button { get; private set; }
public AxisControl axis { get; private set; }
protected override void OnFinishSetup()
{
// Cache controls in getters.
button = GetChildControl("button");
axis = GetChildControl("axis");
}
}</code></pre></example>