Class ButtonControl
An axis that has a trigger point beyond which it is considered to be pressed.
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 ButtonControl : AxisControl
Remarks
By default stored as a single bit. In that format, buttons will only yield 0 and 1 as values.
It may seem unnatural to derive ButtonControl from AxisControl, but doing so brings many benefits through allowing code to flexibly target buttons and axes the same way.
Constructors
ButtonControl()
Declaration
public ButtonControl()
Fields
pressPoint
Declaration
public float pressPoint
Field Value
Type | Description |
---|---|
System.Single |
Properties
isPressed
Declaration
public bool isPressed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
pressPointOrDefault
Declaration
public float pressPointOrDefault { get; }
Property Value
Type | Description |
---|---|
System.Single |
wasPressedThisFrame
Declaration
public bool wasPressedThisFrame { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
wasReleasedThisFrame
Declaration
public bool wasReleasedThisFrame { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
IsValueConsideredPressed(Single)
Declaration
public bool IsValueConsideredPressed(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value |
Returns
Type | Description |
---|---|
System.Boolean |