9092858a58
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
73 lines
3.0 KiB
C#
73 lines
3.0 KiB
C#
using UnityEngine.InputSystem.Layouts;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine.InputSystem.Controls
|
|
{
|
|
/// <summary>
|
|
/// A control representing a two-dimensional motion vector that accumulates within a frame
|
|
/// and resets at the beginning of a frame.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Delta controls are
|
|
/// </remarks>
|
|
/// <see cref="Pointer.delta"/>
|
|
/// <seealso cref="Mouse.scroll"/>
|
|
[Preserve]
|
|
public class DeltaControl : Vector2Control
|
|
{
|
|
/// <summary>
|
|
/// A synthetic axis representing the upper half of the Y axis value, i.e. the 0 to 1 range.
|
|
/// </summary>
|
|
/// <value>Control representing the control's upper half Y axis.</value>
|
|
/// <remarks>
|
|
/// The control is marked as <see cref="InputControl.synthetic"/>.
|
|
/// </remarks>
|
|
[InputControl(useStateFrom = "y", parameters = "clamp=1,clampMin=0,clampMax=3.402823E+38", synthetic = true, displayName = "Up")]
|
|
[Preserve]
|
|
public AxisControl up { get; set; }
|
|
|
|
/// <summary>
|
|
/// A synthetic axis representing the lower half of the Y axis value, i.e. the -1 to 1 range (inverted).
|
|
/// </summary>
|
|
/// <value>Control representing the control's lower half Y axis.</value>
|
|
/// <remarks>
|
|
/// The control is marked as <see cref="InputControl.synthetic"/>.
|
|
/// </remarks>
|
|
[InputControl(useStateFrom = "y", parameters = "clamp=1,clampMin=-3.402823E+38,clampMax=0,invert", synthetic = true, displayName = "Down")]
|
|
[Preserve]
|
|
public AxisControl down { get; set; }
|
|
|
|
/// <summary>
|
|
/// A synthetic axis representing the left half of the X axis value, i.e. the -1 to 1 range (inverted).
|
|
/// </summary>
|
|
/// <value>Control representing the control's left half X axis.</value>
|
|
/// <remarks>
|
|
/// The control is marked as <see cref="InputControl.synthetic"/>.
|
|
/// </remarks>
|
|
[InputControl(useStateFrom = "x", parameters = "clamp=1,clampMin=-3.402823E+38,clampMax=0,invert", synthetic = true, displayName = "Left")]
|
|
[Preserve]
|
|
public AxisControl left { get; set; }
|
|
|
|
/// <summary>
|
|
/// A synthetic axis representing the right half of the X axis value, i.e. the 0 to 1 range.
|
|
/// </summary>
|
|
/// <value>Control representing the control's right half X axis.</value>
|
|
/// <remarks>
|
|
/// The control is marked as <see cref="InputControl.synthetic"/>.
|
|
/// </remarks>
|
|
[InputControl(useStateFrom = "x", parameters = "clamp=1,clampMin=0,clampMax=3.402823E+38", synthetic = true, displayName = "Right")]
|
|
[Preserve]
|
|
public AxisControl right { get; set; }
|
|
|
|
protected override void FinishSetup()
|
|
{
|
|
base.FinishSetup();
|
|
|
|
up = GetChildControl<AxisControl>("up");
|
|
down = GetChildControl<AxisControl>("down");
|
|
left = GetChildControl<AxisControl>("left");
|
|
right = GetChildControl<AxisControl>("right");
|
|
}
|
|
}
|
|
}
|