Class SteamVR_Behaviour_Boolean
This component simplifies using boolean actions.
Provides editor accessible events: OnPress, OnPressDown, OnPressUp, OnChange, and OnUpdate.
Provides script accessible events: OnPressEvent, OnPressDownEvent, OnPressUpEvent, OnChangeEvent, and OnUpdateEvent.
Inheritance
Inherited Members
Namespace: Valve.VR
Assembly: Assembly-CSharp.dll
Syntax
public class SteamVR_Behaviour_Boolean : MonoBehaviour
  Fields
booleanAction
Declaration
[Tooltip("The SteamVR boolean action that this component should use")]
public SteamVR_Action_Boolean booleanAction
  Field Value
| Type | Description | 
|---|---|
| SteamVR_Action_Boolean | 
inputSource
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 | 
onChange
This UnityEvent fires whenever a change happens in the action
Declaration
public SteamVR_Behaviour_BooleanEvent onChange
  Field Value
| Type | Description | 
|---|---|
| SteamVR_Behaviour_BooleanEvent | 
onPress
This UnityEvent will fire whenever the boolean action is true and gets updated
Declaration
public SteamVR_Behaviour_BooleanEvent onPress
  Field Value
| Type | Description | 
|---|---|
| SteamVR_Behaviour_BooleanEvent | 
onPressDown
This UnityEvent will fire whenever the boolean action has changed from false to true in the last update
Declaration
public SteamVR_Behaviour_BooleanEvent onPressDown
  Field Value
| Type | Description | 
|---|---|
| SteamVR_Behaviour_BooleanEvent | 
onPressUp
This UnityEvent will fire whenever the boolean action has changed from true to false in the last update
Declaration
public SteamVR_Behaviour_BooleanEvent onPressUp
  Field Value
| Type | Description | 
|---|---|
| SteamVR_Behaviour_BooleanEvent | 
onUpdate
This UnityEvent fires whenever the action is updated
Declaration
public SteamVR_Behaviour_BooleanEvent onUpdate
  Field Value
| Type | Description | 
|---|---|
| SteamVR_Behaviour_BooleanEvent | 
Properties
actionSet
Returns the action set that this action is in.
Declaration
public SteamVR_ActionSet actionSet { get; }
  Property Value
| Type | Description | 
|---|---|
| SteamVR_ActionSet | 
isActive
Returns true if this action is currently bound and its 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()
  Events
onChangeEvent
This C# event fires whenever a change happens in the action
Declaration
public event SteamVR_Behaviour_Boolean.ChangeHandler onChangeEvent
  Event Type
| Type | Description | 
|---|---|
| SteamVR_Behaviour_Boolean.ChangeHandler | 
onPressDownEvent
This C# event will fire whenever the boolean action has changed from false to true in the last update
Declaration
public event SteamVR_Behaviour_Boolean.StateDownHandler onPressDownEvent
  Event Type
| Type | Description | 
|---|---|
| SteamVR_Behaviour_Boolean.StateDownHandler | 
onPressEvent
This C# event will fire whenever the boolean action is true and gets updated
Declaration
public event SteamVR_Behaviour_Boolean.StateHandler onPressEvent
  Event Type
| Type | Description | 
|---|---|
| SteamVR_Behaviour_Boolean.StateHandler | 
onPressUpEvent
This C# event will fire whenever the boolean action has changed from true to false in the last update
Declaration
public event SteamVR_Behaviour_Boolean.StateUpHandler onPressUpEvent
  Event Type
| Type | Description | 
|---|---|
| SteamVR_Behaviour_Boolean.StateUpHandler | 
onUpdateEvent
This C# event fires whenever the action is updated
Declaration
public event SteamVR_Behaviour_Boolean.UpdateHandler onUpdateEvent
  Event Type
| Type | Description | 
|---|---|
| SteamVR_Behaviour_Boolean.UpdateHandler |