Class ARFoundationFeature
Enables AR Foundation support via OpenXR for Meta devices.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Meta
Syntax
public class ARFoundationFeature : OpenXRFeature
Fields
featureId
The feature id string. This is used to give the feature a well known id for reference.
Declaration
public const string featureId = "com.unity.openxr.feature.arfoundation-meta"
Field Value
Type | Description |
---|---|
String |
Methods
HookGetInstanceProcAddr(IntPtr)
Called to hook xrGetInstanceProcAddr. Returning a different function pointer allows intercepting any OpenXR method.
Declaration
protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | func | xrGetInstanceProcAddr native function pointer |
Returns
Type | Description |
---|---|
IntPtr | Function pointer that Unity will use to look up OpenXR native functions. |
Overrides
OnAppSpaceChange(UInt64)
Called when the reference xrSpace for the app changes.
Declaration
protected override void OnAppSpaceChange(ulong xrSpace)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | xrSpace | Handle of the xrSpace |
Overrides
OnInstanceCreate(UInt64)
Called after xrCreateInstance.
Declaration
protected override bool OnInstanceCreate(ulong xrInstance)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | xrInstance | Handle of the xrInstance |
Returns
Type | Description |
---|---|
Boolean |
Overrides
OnInstanceDestroy(UInt64)
Called before xrDestroyInstance
Declaration
protected override void OnInstanceDestroy(ulong xrInstance)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | xrInstance | Handle of the xrInstance |
Overrides
OnSessionCreate(UInt64)
Called after xrCreateSession.
Declaration
protected override void OnSessionCreate(ulong xrSession)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | xrSession | Handle of the xrSession |
Overrides
OnSessionDestroy(UInt64)
Called before xrDestroySession.
Declaration
protected override void OnSessionDestroy(ulong xrSession)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | xrSession | Handle of the xrSession |
Overrides
OnSubsystemCreate()
Instantiates all Meta OpenXR subsystem instances, but does not start them. (Start/Stop is not a Loader's responsibility and is typically handled by AR Foundation managers.)
Declaration
protected override void OnSubsystemCreate()
Overrides
OnSubsystemDestroy()
This only destroy subsystems since the stop of the subsystems is controlled by AR Foundation managers
Declaration
protected override void OnSubsystemDestroy()
Overrides
OnSystemChange(UInt64)
Called after xrGetSystem.
Declaration
protected override void OnSystemChange(ulong xrSystem)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | xrSystem | Handle of the xrSystemId |