Class ARSessionFeature
Enables AR Foundation session support via OpenXR for Meta Quest devices.
Inherited Members
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.OpenXR.Features.Meta
Assembly: Unity.XR.MetaOpenXR.dll
Syntax
[OpenXRFeature(UiName = "Meta Quest: Session", BuildTargetGroups = new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.Standalone }, Company = "Unity Technologies", Desc = "AR Foundation support on Meta Quest devices. Required as a dependency of any other AR feature.", DocumentationLink = "https://docs.unity3d.com/Packages/com.unity.xr.meta-openxr@2.1/manual/features/session.html", OpenxrExtensionStrings = "XR_FB_scene_capture", Category = "Feature", FeatureId = "com.unity.openxr.feature.arfoundation-meta-session", Version = "0.1.0")]
public class ARSessionFeature : MetaOpenXRFeature
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-session"
Field Value
Type | Description |
---|---|
string |
Methods
OnSessionStateChange(int, int)
Called when the OpenXR loader receives the XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED
event
from the runtime signaling that the XrSessionState has changed.
Declaration
protected override void OnSessionStateChange(int oldState, int newState)
Parameters
Type | Name | Description |
---|---|---|
int | oldState | Previous state |
int | newState | New state |
Overrides
OnSubsystemCreate()
Creates the MetaOpenXRSessionSubsystem, but does not start it. (Start/Stop is typically handled by AR Foundation managers.)
Declaration
protected override void OnSubsystemCreate()
Overrides
OnSubsystemDestroy()
Destroys the session subsystem.
Declaration
protected override void OnSubsystemDestroy()