Table of Contents

Class OpenXRActionMap

Namespace
Godot
Assembly
GodotSharp.dll

OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports.

Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available.

The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map.

public class OpenXRActionMap : Resource, IDisposable
Inheritance
OpenXRActionMap
Implements
Inherited Members

Constructors

OpenXRActionMap()

public OpenXRActionMap()

Properties

ActionSets

Collection of OpenXRActionSets that are part of this action map.

public Array ActionSets { get; set; }

Property Value

Array

InteractionProfiles

Collection of OpenXRInteractionProfiles that are part of this action map.

public Array InteractionProfiles { get; set; }

Property Value

Array

Methods

AddActionSet(OpenXRActionSet)

Add an action set.

public void AddActionSet(OpenXRActionSet actionSet)

Parameters

actionSet OpenXRActionSet

AddInteractionProfile(OpenXRInteractionProfile)

Add an interaction profile.

public void AddInteractionProfile(OpenXRInteractionProfile interactionProfile)

Parameters

interactionProfile OpenXRInteractionProfile

CreateDefaultActionSets()

Setup this action set with our default actions.

public void CreateDefaultActionSets()

FindActionSet(string)

Retrieve an action set by name.

public OpenXRActionSet FindActionSet(string name)

Parameters

name string

Returns

OpenXRActionSet

FindInteractionProfile(string)

Find an interaction profile by its name (path).

public OpenXRInteractionProfile FindInteractionProfile(string name)

Parameters

name string

Returns

OpenXRInteractionProfile

GetActionSet(int)

Retrieve the action set at this index.

public OpenXRActionSet GetActionSet(int idx)

Parameters

idx int

Returns

OpenXRActionSet

GetActionSetCount()

Retrieve the number of actions sets in our action map.

public int GetActionSetCount()

Returns

int

GetInteractionProfile(int)

Get the interaction profile at this index.

public OpenXRInteractionProfile GetInteractionProfile(int idx)

Parameters

idx int

Returns

OpenXRInteractionProfile

GetInteractionProfileCount()

Retrieve the number of interaction profiles in our action map.

public int GetInteractionProfileCount()

Returns

int

HasGodotClassMethod(in godot_string_name)

Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.

protected override bool HasGodotClassMethod(in godot_string_name method)

Parameters

method godot_string_name

Name of the method to check for.

Returns

bool

HasGodotClassSignal(in godot_string_name)

Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.

protected override bool HasGodotClassSignal(in godot_string_name signal)

Parameters

signal godot_string_name

Name of the signal to check for.

Returns

bool

InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)

Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.

protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)

Parameters

method godot_string_name

Name of the method to invoke.

args NativeVariantPtrArgs

Arguments to use with the invoked method.

ret godot_variant

Value returned by the invoked method.

Returns

bool

RemoveActionSet(OpenXRActionSet)

Remove an action set.

public void RemoveActionSet(OpenXRActionSet actionSet)

Parameters

actionSet OpenXRActionSet

RemoveInteractionProfile(OpenXRInteractionProfile)

Remove an interaction profile.

public void RemoveInteractionProfile(OpenXRInteractionProfile interactionProfile)

Parameters

interactionProfile OpenXRInteractionProfile