reckfellENGINE

OpenXRAction

Name, value type and device paths of one OpenXR action.

On this page
class OpenXRActionReckfellSharpInherits Resource

OpenXRAction describes an action such as select or move, not a current press. ResourceName is the internal key; LocalizedName the label. A new resource has ActionType=Float, an empty label and empty ToplevelPaths. Configure it, add it to a set and reference it from separate profile BindingPath entries.

ToplevelPaths stores device paths such as /user/hand/left and /user/hand/right, not button paths. One logical command for both hands uses one action resource and two bindings. C# string[] data is copied here: editing the input array or getter result does not change the resource. Assign edited data back to update it. The ReadOnlySpan overload also copies data into the native resource.

Current named SDK types are Bool, Float, Vector2 and Pose. Native code and the editor have Haptic, but the installed SDK has no named ActionTypeEnum.Haptic. Do not use a nonexistent member or numeric substitution.

All three setters emit Changed even for repeated values. This is a resource-edit signal, not an input event. Editing the resource does not rebuild an attached XR-session action. Adding one instance to a second set transfers it out of the first.

Defaults, setters, notifications, both path overloads, copies and map persistence with bindings were checked in the current runtime. Device input, pose tracking, haptics and runtime path validation were not tested. Complete example and diagnostics: action map.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

OpenXRActionConstructor
# OpenXRAction
C#
public OpenXRAction();

Creates a Float action with empty LocalizedName and ToplevelPaths. Set ResourceName, label, required type and devices, then add it to a set.

Properties3

ActionTypeProperty
# ActionType
C#
public OpenXRAction.ActionTypeEnum ActionType { get; set; }

Action value type, initially Float. Named values in the current C# SDK are Bool, Float, Vector2 and Pose. Native code and the editor also have Haptic, but this SDK exposes no named Haptic member. The setter emits Changed even on repetition and does not change an existing runtime action’s type. Do not replace missing API with a numeric cast.

LocalizedNameProperty
# LocalizedName
C#
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.

ToplevelPathsProperty
# ToplevelPaths
C#
public string[] ToplevelPaths { get; set; }

Top-level device paths for the action, initially empty; for example /user/hand/left and /user/hand/right. Not full button paths or left_hand/right_hand tracker names. C# arrays are copied on assignment and readback; ReadOnlySpan also copies data into native storage. The setter emits Changed even on repetition. Validate paths before attachment; saving a resource does not establish runtime support.

Methods7

GetActionTypeOpenXRAction.ActionTypeEnum
# GetActionType
C#
public OpenXRAction.ActionTypeEnum GetActionType();

Current resource type, initially Float. Describes the action value, not controller type or current input.

Returns OpenXRAction.ActionTypeEnum

Current action type; a new resource returns Float.

GetLocalizedNamestring
# GetLocalizedName
C#
public string GetLocalizedName();

Stored human-readable action label. Query input using the internal ResourceName, not this string.

Returns string

Stored label, initially empty; not ResourceName.

GetToplevelPathsstring[]
# GetToplevelPaths
C#
public string[] GetToplevelPaths();

Independent C# copy of stored top-level device paths. Editing the result does not change the resource: assign edited data through ToplevelPaths/SetToplevelPaths.

Returns string[]

Independent string[] of top-level device paths; empty for a new resource.

SetActionTypevoid
# SetActionType
C#
public void SetActionType(OpenXRAction.ActionTypeEnum actionType);

Action value type, initially Float. Named values in the current C# SDK are Bool, Float, Vector2 and Pose. Native code and the editor also have Haptic, but this SDK exposes no named Haptic member. The setter emits Changed even on repetition and does not change an existing runtime action’s type. Do not replace missing API with a numeric cast.

Parameters
NameTypeDefault
actionTypeOpenXRAction.ActionTypeEnum—
actionType

A named SDK type: Bool, Float, Vector2 or Pose. Does not alter an existing runtime action.

SetLocalizedNamevoid
# SetLocalizedName
C#
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.

Parameters
NameTypeDefault
localizedNamestring—
localizedName

Nonempty human-readable label for the prepared map. Neither an internal name nor automatic translation; supply text in the intended language.

SetToplevelPaths2 overloads
# SetToplevelPaths · 1/2
C#
public void SetToplevelPaths(ReadOnlySpan<string> toplevelPaths);

Top-level device paths for the action, initially empty; for example /user/hand/left and /user/hand/right. Not full button paths or left_hand/right_hand tracker names. C# arrays are copied on assignment and readback; ReadOnlySpan also copies data into native storage. The setter emits Changed even on repetition. Validate paths before attachment; saving a resource does not establish runtime support.

Parameters
NameTypeDefault
toplevelPathsReadOnlySpan<string>—
toplevelPaths

Device paths such as /user/hand/left and /user/hand/right. Not complete button paths; data is copied into the resource.

# SetToplevelPaths · 2/2
C#
public void SetToplevelPaths(string[] toplevelPaths);

Top-level device paths for the action, initially empty; for example /user/hand/left and /user/hand/right. Not full button paths or left_hand/right_hand tracker names. C# arrays are copied on assignment and readback; ReadOnlySpan also copies data into native storage. The setter emits Changed even on repetition. Validate paths before attachment; saving a resource does not establish runtime support.

Parameters
NameTypeDefault
toplevelPathsstring[]—
toplevelPaths

Device paths such as /user/hand/left and /user/hand/right. Not complete button paths; data is copied into the resource.

OpenXRAction.ActionTypeEnum

ValueDescription
Bool = 0

This action provides a boolean value.

Float = 1

This action provides a float value between 0.0 and 1.0 for any analog input such as triggers.

Pose = 3
Vector2 = 2

This action provides a Vector2 value and can be bound to embedded trackpads and joysticks.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.