Class SteamVR_Action_Single
Inheritance
Inherited Members
Namespace: Valve.VR
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
public class SteamVR_Action_Single : SteamVR_Action_In<SteamVR_Action_Single_Source_Map, SteamVR_Action_Single_Source>, IEquatable<SteamVR_Action>, ISteamVR_Action_In, ISteamVR_Action, ISteamVR_Action_Single, ISteamVR_Action_In_Source, ISteamVR_Action_Source, ISerializationCallbackReceiver
Constructors
SteamVR_Action_Single()
Declaration
public SteamVR_Action_Single()
Properties
axis
[Shortcut to: SteamVR_Input_Sources.Any] The current float value of the action. Note: Will only return non-zero if the action is also active.
Declaration
public float axis { get; }
Property Value
Type | Description |
---|---|
System.Single |
delta
[Shortcut to: SteamVR_Input_Sources.Any] The float value difference between this update and the previous update. Note: Will only return non-zero if the action is also active.
Declaration
public float delta { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastAxis
[Shortcut to: SteamVR_Input_Sources.Any] The float value of the action from the previous update. Note: Will only return non-zero if the action is also active.
Declaration
public float lastAxis { get; }
Property Value
Type | Description |
---|---|
System.Single |
lastDelta
[Shortcut to: SteamVR_Input_Sources.Any] The float value difference between the previous update and update before that. Note: Will only return non-zero if the action is also active.
Declaration
public float lastDelta { get; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
AddOnActiveBindingChangeListener(SteamVR_Action_Single.ActiveChangeHandler, SteamVR_Input_Sources)
Executes a function when the active state of this action (with the specified inputSource) changes. This happens when the action is bound or unbound
Declaration
public void AddOnActiveBindingChangeListener(SteamVR_Action_Single.ActiveChangeHandler functionToCall, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.ActiveChangeHandler | functionToCall | A local function that receives the boolean action who's active state changes and the corresponding input source |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
AddOnActiveChangeListener(SteamVR_Action_Single.ActiveChangeHandler, SteamVR_Input_Sources)
Executes a function when the functional active state of this action (with the specified inputSource) changes. This happens when the action is bound or unbound, or when the ActionSet changes state.
Declaration
public void AddOnActiveChangeListener(SteamVR_Action_Single.ActiveChangeHandler functionToCall, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.ActiveChangeHandler | functionToCall | A local function that receives the boolean action who's active state changes and the corresponding input source |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
AddOnAxisListener(SteamVR_Action_Single.AxisHandler, SteamVR_Input_Sources)
Executes a function when the float value of the action is non-zero.
Declaration
public void AddOnAxisListener(SteamVR_Action_Single.AxisHandler functionToCall, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.AxisHandler | functionToCall | A local function that receives the boolean action who's state has changed, the corresponding input source, and the new value |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
AddOnChangeListener(SteamVR_Action_Single.ChangeHandler, SteamVR_Input_Sources)
Executes a function when the axis changes by more than the specified changeTolerance
Declaration
public void AddOnChangeListener(SteamVR_Action_Single.ChangeHandler functionToCall, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.ChangeHandler | functionToCall | A local function that receives the boolean action who's state has changed, the corresponding input source, and the new value |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
AddOnUpdateListener(SteamVR_Action_Single.UpdateHandler, SteamVR_Input_Sources)
Executes a function when the state of this action (with the specified inputSource) is updated.
Declaration
public void AddOnUpdateListener(SteamVR_Action_Single.UpdateHandler functionToCall, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.UpdateHandler | functionToCall | A local function that receives the boolean action who's state has changed, the corresponding input source, and the new value |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
GetAxis(SteamVR_Input_Sources)
The current float value of the action
Declaration
public float GetAxis(SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
Returns
Type | Description |
---|---|
System.Single |
GetAxisDelta(SteamVR_Input_Sources)
The float value difference between this update and the previous update.
Declaration
public float GetAxisDelta(SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
Returns
Type | Description |
---|---|
System.Single |
GetLastAxis(SteamVR_Input_Sources)
The float value of the action from the previous update.
Declaration
public float GetLastAxis(SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
Returns
Type | Description |
---|---|
System.Single |
GetLastAxisDelta(SteamVR_Input_Sources)
The float value difference between the previous update and update before that.
Declaration
public float GetLastAxisDelta(SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
Returns
Type | Description |
---|---|
System.Single |
RemoveOnActiveBindingChangeListener(SteamVR_Action_Single.ActiveChangeHandler, SteamVR_Input_Sources)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnActiveBindingChangeListener(SteamVR_Action_Single.ActiveChangeHandler functionToStopCalling, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.ActiveChangeHandler | functionToStopCalling | The local function that you've setup to receive update events |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
RemoveOnActiveChangeListener(SteamVR_Action_Single.ActiveChangeHandler, SteamVR_Input_Sources)
Stops executing a function when the functional active state of this action (with the specified inputSource) changes. This happens when the action is bound or unbound, or when the ActionSet changes state.
Declaration
public void RemoveOnActiveChangeListener(SteamVR_Action_Single.ActiveChangeHandler functionToStopCalling, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.ActiveChangeHandler | functionToStopCalling | The local function that you've setup to receive update events |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
RemoveOnAxisListener(SteamVR_Action_Single.AxisHandler, SteamVR_Input_Sources)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnAxisListener(SteamVR_Action_Single.AxisHandler functionToStopCalling, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.AxisHandler | functionToStopCalling | The local function that you've setup to receive update events |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
RemoveOnChangeListener(SteamVR_Action_Single.ChangeHandler, SteamVR_Input_Sources)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnChangeListener(SteamVR_Action_Single.ChangeHandler functionToStopCalling, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.ChangeHandler | functionToStopCalling | The local function that you've setup to receive on change events |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
RemoveOnUpdateListener(SteamVR_Action_Single.UpdateHandler, SteamVR_Input_Sources)
Stops executing the function setup by the corresponding AddListener
Declaration
public void RemoveOnUpdateListener(SteamVR_Action_Single.UpdateHandler functionToStopCalling, SteamVR_Input_Sources inputSource)
Parameters
Type | Name | Description |
---|---|---|
SteamVR_Action_Single.UpdateHandler | functionToStopCalling | The local function that you've setup to receive update events |
SteamVR_Input_Sources | inputSource | The device you would like to get data from. Any if the action is not device specific. |
Events
onActiveBindingChange
[Shortcut to: SteamVR_Input_Sources.Any] This event fires when the active state of the binding changes
Declaration
public event SteamVR_Action_Single.ActiveChangeHandler onActiveBindingChange
Event Type
Type | Description |
---|---|
SteamVR_Action_Single.ActiveChangeHandler |
onActiveChange
[Shortcut to: SteamVR_Input_Sources.Any] This event fires when the active state (ActionSet active and binding active) changes
Declaration
public event SteamVR_Action_Single.ActiveChangeHandler onActiveChange
Event Type
Type | Description |
---|---|
SteamVR_Action_Single.ActiveChangeHandler |
onAxis
[Shortcut to: SteamVR_Input_Sources.Any] This event will fire whenever the float value of the action is non-zero
Declaration
public event SteamVR_Action_Single.AxisHandler onAxis
Event Type
Type | Description |
---|---|
SteamVR_Action_Single.AxisHandler |
onChange
[Shortcut to: SteamVR_Input_Sources.Any] This event fires whenever the axis changes by more than the specified changeTolerance
Declaration
public event SteamVR_Action_Single.ChangeHandler onChange
Event Type
Type | Description |
---|---|
SteamVR_Action_Single.ChangeHandler |
onUpdate
[Shortcut to: SteamVR_Input_Sources.Any] This event fires whenever the action is updated
Declaration
public event SteamVR_Action_Single.UpdateHandler onUpdate
Event Type
Type | Description |
---|---|
SteamVR_Action_Single.UpdateHandler |
Explicit Interface Implementations
ISerializationCallbackReceiver.OnAfterDeserialize()
Declaration
void ISerializationCallbackReceiver.OnAfterDeserialize()
ISerializationCallbackReceiver.OnBeforeSerialize()
Declaration
void ISerializationCallbackReceiver.OnBeforeSerialize()