Class SteamVR_Behaviour_Single
SteamVR_Behaviour_Single simplifies the use of single actions. It gives an event to subscribe to for when the action has changed.
Inheritance
Inherited Members
Namespace: Valve.VR
Assembly: Assembly-CSharp.dll
Syntax
public class SteamVR_Behaviour_Single : MonoBehaviour
Fields
inputSource
The device this action applies to. Any if the action is not device specific.
Declaration
[Tooltip("The device this action should apply to. Any if the action is not device specific.")]
public SteamVR_Input_Sources inputSource
Field Value
Type | Description |
---|---|
SteamVR_Input_Sources |
onAxis
Unity event that Fires whenever the action's value has been updated and is non-zero
Declaration
[Tooltip("Fires whenever the action's value has been updated and is non-zero.")]
public SteamVR_Behaviour_SingleEvent onAxis
Field Value
Type | Description |
---|---|
SteamVR_Behaviour_SingleEvent |
onAxisEvent
C# event that fires whenever the action's value has been updated and is non-zero
Declaration
public SteamVR_Behaviour_Single.AxisHandler onAxisEvent
Field Value
Type | Description |
---|---|
SteamVR_Behaviour_Single.AxisHandler |
onChange
Unity event that Fires whenever the action's value has changed since the last update.
Declaration
[Tooltip("Fires whenever the action's value has changed since the last update.")]
public SteamVR_Behaviour_SingleEvent onChange
Field Value
Type | Description |
---|---|
SteamVR_Behaviour_SingleEvent |
onChangeEvent
C# event that fires whenever the action's value has changed since the last update.
Declaration
public SteamVR_Behaviour_Single.ChangeHandler onChangeEvent
Field Value
Type | Description |
---|---|
SteamVR_Behaviour_Single.ChangeHandler |
onUpdate
Unity event that Fires whenever the action's value has been updated
Declaration
[Tooltip("Fires whenever the action's value has been updated.")]
public SteamVR_Behaviour_SingleEvent onUpdate
Field Value
Type | Description |
---|---|
SteamVR_Behaviour_SingleEvent |
onUpdateEvent
C# event that fires whenever the action's value has been updated
Declaration
public SteamVR_Behaviour_Single.UpdateHandler onUpdateEvent
Field Value
Type | Description |
---|---|
SteamVR_Behaviour_Single.UpdateHandler |
singleAction
The single action to get data from.
Declaration
public SteamVR_Action_Single singleAction
Field Value
Type | Description |
---|---|
SteamVR_Action_Single |
Properties
isActive
Returns whether this action is bound and the action set is active
Declaration
public bool isActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
AddHandlers()
Declaration
protected void AddHandlers()
GetLocalizedName(EVRInputStringBits[])
Gets the localized name of the device that the action corresponds to.
Declaration
public string GetLocalizedName(params EVRInputStringBits[] localizedParts)
Parameters
Type | Name | Description |
---|---|---|
EVRInputStringBits[] | localizedParts |
|
Returns
Type | Description |
---|---|
System.String |
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
RemoveHandlers()
Declaration
protected void RemoveHandlers()