Class OpenXRExtensionWrapperExtension
- Namespace
- Godot
- Assembly
- GodotSharp.dll
OpenXRExtensionWrapperExtension allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with RegisterExtensionWrapper().
public class OpenXRExtensionWrapperExtension : GodotObject, IDisposable
- Inheritance
-
OpenXRExtensionWrapperExtension
- Implements
- Inherited Members
Constructors
OpenXRExtensionWrapperExtension()
public OpenXRExtensionWrapperExtension()
Methods
GetOpenxrApi()
Returns the created OpenXRApiExtension, which can be used to access the OpenXR API.
public OpenXRApiExtension GetOpenxrApi()
Returns
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_nameName of the method to check for.
Returns
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_nameName of the signal to check for.
Returns
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_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
RegisterExtensionWrapper()
Registers the extension. This should happen at core module initialization level.
public void RegisterExtensionWrapper()
_GetRequestedExtensions()
Returns a Dictionary of OpenXR extensions related to this extension. The Dictionary should contain the name of the extension, mapped to a bool *
cast to an integer:
- If the bool *
is a nullptr
this extension is mandatory.
- If the bool *
points to a boolean, the boolean will be updated to true
if the extension is enabled.
public virtual Dictionary _GetRequestedExtensions()
Returns
_OnBeforeInstanceCreated()
Called before the OpenXR instance is created.
public virtual void _OnBeforeInstanceCreated()
_OnInstanceCreated(ulong)
Called right after the OpenXR instance is created.
public virtual void _OnInstanceCreated(ulong instance)
Parameters
instance
ulong
_OnInstanceDestroyed()
Called right before the OpenXR instance is destroyed.
public virtual void _OnInstanceDestroyed()
_OnPreRender()
Called right before the XR viewports begin their rendering step.
public virtual void _OnPreRender()
_OnProcess()
Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic.
public virtual void _OnProcess()
_OnRegisterMetadata()
Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor.
Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware.
public virtual void _OnRegisterMetadata()
_OnSessionCreated(ulong)
Called right after the OpenXR session is created.
public virtual void _OnSessionCreated(ulong session)
Parameters
session
ulong
_OnSessionDestroyed()
Called right before the OpenXR session is destroyed.
public virtual void _OnSessionDestroyed()
_OnStateExiting()
Called when the OpenXR session state is changed to exiting.
public virtual void _OnStateExiting()
_OnStateFocused()
Called when the OpenXR session state is changed to focused. This state is the active state when the game runs.
public virtual void _OnStateFocused()
_OnStateIdle()
Called when the OpenXR session state is changed to idle.
public virtual void _OnStateIdle()
_OnStateLossPending()
Called when the OpenXR session state is changed to loss pending.
public virtual void _OnStateLossPending()
_OnStateReady()
Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session.
public virtual void _OnStateReady()
_OnStateStopping()
Called when the OpenXR session state is changed to stopping.
public virtual void _OnStateStopping()
_OnStateSynchronized()
Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus.
public virtual void _OnStateSynchronized()
_OnStateVisible()
Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames.
public virtual void _OnStateVisible()