OpenXRActionSet
A named collection of action resources with a priority.
OpenXRActionSet groups actions such as gameplay or menu. ResourceName is the internal name, LocalizedName the label and Priority the conflict priority among active sets. A new set is empty, with an empty label and Priority=0. These resources describe a future runtime set; changing Priority does not toggle activity.
One action belongs to one set. AddAction transfers a resource from its previous set; repeating the same resource is ignored. Create distinct instances for independent actions. Validate internal-name and label uniqueness separately.
Actions/GetActions returns a shared Array. Do not Clear() or directly assign it back: this bypasses ownership maintenance or clears the list. Duplicate() the container, edit it and pass it to SetActions for replacement. Resources in the copy remain shared.
SetLocalizedName and SetPriority emit Changed even for repeated values. SetActions clears ownership and re-adds actions, so it does not promise exactly one notification. RemoveAction removes the resource from the set but does not clean up profile-binding references for you.
Defaults, notifications, identity, self-assignment and safe container replacement were checked in the installed engine without an XR session. Headset priority behavior and runtime-set switching were not tested. Complete example: action map.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRActionSetConstructor
public OpenXRActionSet();Creates an empty set with Priority=0 and empty LocalizedName. Set ResourceName and a label, add actions and place the set in a map before session startup.
Properties3
ActionsProperty
public Reckfell.Collections.Array Actions { get; set; }Action resources in the set. The getter returns a shared Array. The setter removes old ownership and calls AddAction again; repeated resource identities are not added. Self-assignment of the shared array clears the list. Duplicate() the container before replacement. Direct edits to the returned Array bypass ownership maintenance and Changed; prefer AddAction/RemoveAction.
LocalizedNameProperty
public string LocalizedName { get; set; }Human-readable label, initially empty. ResourceName separately stores the internal key. The setter stores the string and emits Changed even on repetition; it does not fully validate OpenXR requirements. Supply a nonempty unique label in the appropriate namespace before session attachment. Editing the resource does not rename an already created runtime action/set.
PriorityProperty
public int Priority { get; set; }Set priority for resolving conflicts among active sets, initially 0. The setter stores an int without validation and emits Changed even on repetition; use nonnegative values. Does not activate the set or alter session activity. The value is supplied when creating the runtime set, so editing the resource does not rebuild an attached session.
Methods9
AddActionvoid
public void AddAction(OpenXRAction action);Adds a non-null action and emits Changed; repeats of the same resource are ignored. An action owned by another set is removed there. Create separate resources for independent actions in two sets. This method does not validate name or label uniqueness.
| Name | Type | Default |
|---|---|---|
action | OpenXRAction | — |
actionNon-null OpenXRAction. Adding transfers it from another set; removal targets this exact resource.
GetActionCountint
public int GetActionCount();Number of action resources in the set. Not a count of presses, available devices or active runtime actions.
intAction-resource count in the set, initially 0.
GetActionsReckfell.Collections.Array
public Reckfell.Collections.Array GetActions();Action resources in the set. The getter returns a shared Array. The setter removes old ownership and calls AddAction again; repeated resource identities are not added. Self-assignment of the shared array clears the list. Duplicate() the container before replacement. Direct edits to the returned Array bypass ownership maintenance and Changed; prefer AddAction/RemoveAction.
Reckfell.Collections.ArrayShared action Array; use set methods to maintain ownership links.
GetLocalizedNamestring
public string GetLocalizedName();Stored human-readable label. Read the internal set name from ResourceName.
stringStored label, initially empty; not ResourceName.
GetPriorityint
public int GetPriority();Stored resource priority, initially 0. Does not establish its application by an attached runtime.
intStored resource-priority int, initially 0.
RemoveActionvoid
public void RemoveAction(OpenXRAction action);Removes the supplied action, clears its ownership link and emits Changed if present. An absent action leaves the set unchanged. Does not automatically remove profile bindings or rebuild an XR session.
| Name | Type | Default |
|---|---|---|
action | OpenXRAction | — |
actionNon-null OpenXRAction. Adding transfers it from another set; removal targets this exact resource.
SetActionsvoid
public void SetActions(Reckfell.Collections.Array actions);Action resources in the set. The getter returns a shared Array. The setter removes old ownership and calls AddAction again; repeated resource identities are not added. Self-assignment of the shared array clears the list. Duplicate() the container before replacement. Direct edits to the returned Array bypass ownership maintenance and Changed; prefer AddAction/RemoveAction.
| Name | Type | Default |
|---|---|---|
actions | Reckfell.Collections.Array | — |
actionsSeparate Array of non-null OpenXRAction resources; use Duplicate() when replacing the list from its own getter.
SetLocalizedNamevoid
public void SetLocalizedName(string localizedName);Human-readable label, initially empty. ResourceName separately stores the internal key. The setter stores the string and emits Changed even on repetition; it does not fully validate OpenXR requirements. Supply a nonempty unique label in the appropriate namespace before session attachment. Editing the resource does not rename an already created runtime action/set.
| Name | Type | Default |
|---|---|---|
localizedName | string | — |
localizedNameNonempty human-readable label for the prepared map. Neither an internal name nor automatic translation; supply text in the intended language.
SetPriorityvoid
public void SetPriority(int priority);Set priority for resolving conflicts among active sets, initially 0. The setter stores an int without validation and emits Changed even on repetition; use nonnegative values. Does not activate the set or alter session activity. The value is supplied when creating the runtime set, so editing the resource does not rebuild an attached session.
| Name | Type | Default |
|---|---|---|
priority | int | — |
priorityNonnegative priority for future runtime-set creation. The setter does not validate the range.