Class SteamVR_Action
Inheritance
System.Object
SteamVR_Action
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Assembly: Assembly-CSharp.dll
Syntax
[Serializable]
public abstract class SteamVR_Action : IEquatable<SteamVR_Action>, ISteamVR_Action, ISteamVR_Action_Source
Constructors
SteamVR_Action()
Declaration
Fields
actionPath
Declaration
[SerializeField]
protected string actionPath
Field Value
Type |
Description |
System.String |
|
needsReinit
Declaration
[SerializeField]
protected bool needsReinit
Field Value
Type |
Description |
System.Boolean |
|
startUpdatingSourceOnAccess
Not recommended. Determines if we should do a lazy-loading style of updating actions where we don't check for their data until the code asks for it. Note: You will have to manually activate actions otherwise. Not recommended.
Declaration
public static bool startUpdatingSourceOnAccess
Field Value
Type |
Description |
System.Boolean |
|
Properties
actionSet
The actionset this action is contained within
Declaration
public abstract SteamVR_ActionSet actionSet { get; }
Property Value
active
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action is bound and the actionset is active
Declaration
public abstract bool active { get; }
Property Value
Type |
Description |
System.Boolean |
|
activeBinding
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action is bound
Declaration
public abstract bool activeBinding { get; }
Property Value
Type |
Description |
System.Boolean |
|
direction
The action direction of this action (in for input - most actions, out for output - mainly haptics)
Declaration
public abstract SteamVR_ActionDirections direction { get; }
Property Value
fullPath
The full string path for this action
Declaration
public abstract string fullPath { get; }
Property Value
Type |
Description |
System.String |
|
handle
The underlying handle for this action used for native SteamVR Input calls
Declaration
public abstract ulong handle { get; }
Property Value
Type |
Description |
System.UInt64 |
|
lastActive
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action was bound and the actionset was active at the previous update
Declaration
public abstract bool lastActive { get; }
Property Value
Type |
Description |
System.Boolean |
|
lastActiveBinding
Declaration
public abstract bool lastActiveBinding { get; }
Property Value
Type |
Description |
System.Boolean |
|
setActive
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action set that contains this action is active for Any input source.
Declaration
public bool setActive { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Create<CreateType>(String)
[Should not be called by user code] Creates an actual action that will later be called by user code.
Declaration
public static CreateType Create<CreateType>(string newActionPath)
where CreateType : SteamVR_Action, new()
Parameters
Type |
Name |
Description |
System.String |
newActionPath |
|
Returns
Type |
Description |
CreateType |
|
Type Parameters
Name |
Description |
CreateType |
|
CreateUninitialized(String, Boolean)
Declaration
protected abstract void CreateUninitialized(string newActionPath, bool caseSensitive)
Parameters
Type |
Name |
Description |
System.String |
newActionPath |
|
System.Boolean |
caseSensitive |
|
CreateUninitialized(String, SteamVR_ActionDirections, String, Boolean)
Declaration
protected abstract void CreateUninitialized(string newActionSet, SteamVR_ActionDirections direction, string newAction, bool caseSensitive)
Parameters
Type |
Name |
Description |
System.String |
newActionSet |
|
SteamVR_ActionDirections |
direction |
|
System.String |
newAction |
|
System.Boolean |
caseSensitive |
|
CreateUninitialized<CreateType>(String, Boolean)
[Should not be called by user code] Creates an uninitialized action that can be saved without being attached to a real action
Declaration
public static CreateType CreateUninitialized<CreateType>(string actionPath, bool caseSensitive)
where CreateType : SteamVR_Action, new()
Parameters
Type |
Name |
Description |
System.String |
actionPath |
|
System.Boolean |
caseSensitive |
|
Returns
Type |
Description |
CreateType |
|
Type Parameters
Name |
Description |
CreateType |
|
CreateUninitialized<CreateType>(String, SteamVR_ActionDirections, String, Boolean)
[Should not be called by user code] Creates an uninitialized action that can be saved without being attached to a real action
Declaration
public static CreateType CreateUninitialized<CreateType>(string setName, SteamVR_ActionDirections direction, string newActionName, bool caseSensitive)
where CreateType : SteamVR_Action, new()
Parameters
Type |
Name |
Description |
System.String |
setName |
|
SteamVR_ActionDirections |
direction |
|
System.String |
newActionName |
|
System.Boolean |
caseSensitive |
|
Returns
Type |
Description |
CreateType |
|
Type Parameters
Name |
Description |
CreateType |
|
Equals(Object)
Compares two SteamVR_Actions by their action path instead of references
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
System.Object |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.Object.Equals(System.Object)
Equals(SteamVR_Action)
Compares two SteamVR_Actions by their action path instead of references
Declaration
public bool Equals(SteamVR_Action other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
FindExistingActionForPartialPath(String)
Tries to find an existing action matching some subsection of an action path. More useful functions in SteamVR_Input.
Declaration
public static SteamVR_Action FindExistingActionForPartialPath(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
|
Returns
Gets a value indicating whether or not the action is currently bound and if the containing action set is active
Declaration
public abstract bool GetActive(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.Boolean |
|
Gets a value indicating whether or not the action is currently bound
Declaration
public abstract bool GetActiveBinding(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.Boolean |
|
GetCopy<CreateType>()
[Should not be called by user code] Gets a copy of the underlying source map so we're always using the same underlying event data
Declaration
public CreateType GetCopy<CreateType>()
where CreateType : SteamVR_Action, new()
Returns
Type |
Description |
CreateType |
|
Type Parameters
Name |
Description |
CreateType |
|
GetHashCode()
Creates a hashcode from the full action path of this action
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.Object.GetHashCode()
Gets the value from the previous update indicating whether or not the action is currently bound and if the containing action set is active
Declaration
public abstract bool GetLastActive(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.Boolean |
|
Gets the value from the previous update indicating whether or not the action is currently bound
Declaration
public abstract bool GetLastActiveBinding(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.Boolean |
|
GetPath()
Returns the full action path for this action.
Declaration
Returns
Type |
Description |
System.String |
|
Gets a value indicating whether or not the containing action set is active
Declaration
public bool GetSetActive(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.Boolean |
|
GetShortName()
Gets just the name of this action. The last part of the path for this action. Removes action set, and direction.
Declaration
public string GetShortName()
Returns
Type |
Description |
System.String |
|
GetSourceMap()
Declaration
public abstract SteamVR_Action_Source_Map GetSourceMap()
Returns
Gets the last timestamp this action was changed. (by Time.realtimeSinceStartup)
Declaration
public abstract float GetTimeLastChanged(SteamVR_Input_Sources inputSource)
Parameters
Type |
Name |
Description |
SteamVR_Input_Sources |
inputSource |
The input source to use to select the last changed time
|
Returns
Type |
Description |
System.Single |
|
Initialize(Boolean, Boolean)
Initializes the individual sources as well as the base map itself. Gets the handle for the action from SteamVR and does any other SteamVR related setup that needs to be done
Declaration
public abstract void Initialize(bool createNew = false, bool throwNotSetError = true)
Parameters
Type |
Name |
Description |
System.Boolean |
createNew |
|
System.Boolean |
throwNotSetError |
|
InitializeCopy(String, SteamVR_Action_Source_Map)
Declaration
protected abstract void InitializeCopy(string newActionPath, SteamVR_Action_Source_Map newData)
Parameters
Returns true if the data for this action is being updated for the specified input source. This can be triggered by querying the data
Declaration
public abstract bool IsUpdating(SteamVR_Input_Sources inputSource)
Parameters
Returns
Type |
Description |
System.Boolean |
|
PreInitialize(String)
Prepares the action to be initialized. Creating dictionaries, finding the right existing action, etc.
Declaration
public abstract void PreInitialize(string newActionPath)
Parameters
Type |
Name |
Description |
System.String |
newActionPath |
|
TryNeedsInitData()
Declaration
public abstract string TryNeedsInitData()
Returns
Type |
Description |
System.String |
|
Operators
Equality(SteamVR_Action, SteamVR_Action)
Compares two SteamVR_Actions by their action path.
Declaration
public static bool operator ==(SteamVR_Action action1, SteamVR_Action action2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(SteamVR_Action, SteamVR_Action)
Compares two SteamVR_Actions by their action path.
Declaration
public static bool operator !=(SteamVR_Action action1, SteamVR_Action action2)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>