Class MockRuntime
OpenXR Mock Runtime
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Mock
Assembly: solution.dll
Syntax
public class MockRuntime : OpenXRFeature
Fields
Name | Description |
---|---|
featureId | The feature id string. This is used to give the feature a well known id for reference. |
ignoreValidationErrors | Don't fail to build if there are validation errors. |
Properties
Name | Description |
---|---|
Instance | Return the singleton instance of the Mock Runtime feature. |
Methods
Name | Description |
---|---|
CauseInstanceLoss() | Force MockRuntime instance loss. |
ClearFunctionCallbacks() | Remove all OpenXR function callbacks |
GetAfterFunctionCallback(string) | Return the callback set to be called after the given OpenXR function is called |
GetBeforeFunctionCallback(string) | Return the callback set to be called before the given OpenXR function is called |
HookCreateInstance(IntPtr) | Called to hook xrGetInstanceProcAddr. |
OnInstanceDestroy(ulong) | Called before xrDestroyInstance |
RequestExitSession() | Request to exit the runtime session. |
ResetDefaults() | Reset the MockRuntime testing settings back to defaults |
SetFunctionCallback(string, AfterFunctionDelegate) | Set a callback to call before the given OpenXR function is called within the Mock Runtime |
SetFunctionCallback(string, BeforeFunctionDelegate) | Set a callback to call before the given OpenXR function is called within the Mock Runtime Note that since some OpenXR functions are called from within the graphics thread that care should be taken to maintain thread safety from within the callbacks. Note that function callbacks can be set prior to the MockRuntime being initialized but will be reset when the mock runtime is shutdown. |
SetFunctionCallback(string, BeforeFunctionDelegate, AfterFunctionDelegate) | Set the callbacks to call before and after the given OpenXR function is called within the Mock Runtime Note that since some OpenXR functions are called from within the graphics thread that care should be taken to maintain thread safety from within the callbacks. Note that function callbacks can be set prior to the MockRuntime being initialized but will be reset when the mock runtime is shutdown. |
SetKeepFunctionCallbacks(bool) | Keep function callbacks when resetting MockRuntime. |
SetSpace(ulong, Vector3, Quaternion, XrSpaceLocationFlags) | Set the reference space to use for input actions. |
SetSpace(XrReferenceSpaceType, Vector3, Quaternion, XrSpaceLocationFlags) | Set the reference space to use at Runtime. |
SetViewPose(XrViewConfigurationType, int, Vector3, Quaternion, Vector4) | Set the runtime ViewPose. |
SetViewState(XrViewConfigurationType, XrViewStateFlags) | Set the runtime ViewState. |
Events
Name | Description |
---|---|
onScriptEvent | Subscribe delegates to ScriptEvents. |