Class SteamVR_Action<SourceMap, SourceElement>
Inheritance
System.Object
SteamVR_Action<SourceMap, SourceElement>
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<SourceMap, SourceElement> : SteamVR_Action, IEquatable<SteamVR_Action>, ISteamVR_Action, ISteamVR_Action_Source where SourceMap : SteamVR_Action_Source_Map<SourceElement>, new()
where SourceElement : SteamVR_Action_Source, new()
Type Parameters
| Name |
Description |
| SourceMap |
|
| SourceElement |
|
Fields
initialized
Declaration
[NonSerialized]
protected bool initialized
Field Value
| Type |
Description |
| System.Boolean |
|
sourceMap
The map to the source elements, a dictionary of source elements. Should be accessed through the action indexer
Declaration
[NonSerialized]
protected SourceMap sourceMap
Field Value
| Type |
Description |
| SourceMap |
|
Properties
actionSet
The actionset this action is contained within
Declaration
public override SteamVR_ActionSet actionSet { get; }
Property Value
Overrides
active
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action is bound and the actionset is active
Declaration
public override bool active { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
activeBinding
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action is bound
Declaration
public override bool activeBinding { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
direction
The action direction of this action (in for input - most actions, out for output - mainly haptics)
Declaration
public override SteamVR_ActionDirections direction { get; }
Property Value
Overrides
fullPath
The full string path for this action
Declaration
public override string fullPath { get; }
Property Value
| Type |
Description |
| System.String |
|
Overrides
handle
The underlying handle for this action used for native SteamVR Input calls
Declaration
public override ulong handle { get; }
Property Value
| Type |
Description |
| System.UInt64 |
|
Overrides
Access this action restricted to individual input sources.
Declaration
public virtual SourceElement this[SteamVR_Input_Sources inputSource] { get; }
Parameters
Property Value
| Type |
Description |
| SourceElement |
|
lastActive
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action was bound and the ActionSet was active during the previous update
Declaration
public override bool lastActive { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
lastActiveBinding
[Shortcut to: SteamVR_Input_Sources.Any] Returns true if the action was bound at the previous update
Declaration
public override bool lastActiveBinding { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
Methods
CreateUninitialized(String, Boolean)
Declaration
protected override void CreateUninitialized(string newActionPath, bool caseSensitive)
Parameters
| Type |
Name |
Description |
| System.String |
newActionPath |
|
| System.Boolean |
caseSensitive |
|
Overrides
CreateUninitialized(String, SteamVR_ActionDirections, String, Boolean)
Declaration
protected override 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 |
|
Overrides
Gets a value indicating whether or not the action is currently bound and if the containing action set is active
Declaration
public override 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 |
|
Overrides
Gets a value indicating whether or not the action is currently bound
Declaration
public override 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 |
|
Overrides
Gets the value from the previous update indicating whether or not the action was currently bound and if the containing action set was active
Declaration
public override 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 |
|
Overrides
Gets the value from the previous update indicating whether or not the action is currently bound
Declaration
public override 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 |
|
Overrides
GetSourceMap()
[Should not be called by user code] Returns the underlying source map for the action.
[Should not be called by user code] Returns the underlying source map for the action.
Declaration
public override SteamVR_Action_Source_Map GetSourceMap()
Returns
Overrides
InitAfterDeserialize()
Declaration
protected void InitAfterDeserialize()
Initialize(Boolean, Boolean)
[Should not be called by user code] 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 override void Initialize(bool createNew = false, bool throwErrors = true)
Parameters
| Type |
Name |
Description |
| System.Boolean |
createNew |
|
| System.Boolean |
throwErrors |
|
Overrides
InitializeCopy(String, SteamVR_Action_Source_Map)
Declaration
protected override void InitializeCopy(string newActionPath, SteamVR_Action_Source_Map newData)
Parameters
Overrides
PreInitialize(String)
Prepares the action to be initialized. Creating dictionaries, finding the right existing action, etc.
Declaration
public override void PreInitialize(string newActionPath)
Parameters
| Type |
Name |
Description |
| System.String |
newActionPath |
|
Overrides
TryNeedsInitData()
[Should not be called by user code] If it looks like we aren't attached to a real action then try and find the existing action for our given path.
Declaration
public override string TryNeedsInitData()
Returns
| Type |
Description |
| System.String |
|
Overrides
Implements
System.IEquatable<T>