docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARSessionFeature

    Enables AR Foundation session support via OpenXR for Meta Quest devices.

    Inheritance
    object
    Object
    ScriptableObject
    OpenXRFeature
    ARSessionFeature
    Inherited Members
    OpenXRFeature.enabled
    OpenXRFeature.xrGetInstanceProcAddr
    OpenXRFeature.OnSubsystemStart()
    OpenXRFeature.OnSubsystemStop()
    OpenXRFeature.OnSessionBegin(ulong)
    OpenXRFeature.OnSessionEnd(ulong)
    OpenXRFeature.OnSessionExiting(ulong)
    OpenXRFeature.OnSessionLossPending(ulong)
    OpenXRFeature.OnInstanceLossPending(ulong)
    OpenXRFeature.OnFormFactorChange(int)
    OpenXRFeature.OnViewConfigurationTypeChange(int)
    OpenXRFeature.OnEnvironmentBlendModeChange(XrEnvironmentBlendMode)
    OpenXRFeature.OnEnabledChange()
    OpenXRFeature.PathToString(ulong)
    OpenXRFeature.StringToPath(string)
    OpenXRFeature.GetCurrentInteractionProfile(ulong)
    OpenXRFeature.GetCurrentInteractionProfile(string)
    OpenXRFeature.GetCurrentAppSpace()
    OpenXRFeature.GetViewConfigurationTypeForRenderPass(int)
    OpenXRFeature.SetEnvironmentBlendMode(XrEnvironmentBlendMode)
    OpenXRFeature.GetEnvironmentBlendMode()
    OpenXRFeature.GetValidationChecks(List<OpenXRFeature.ValidationRule>, BuildTargetGroup)
    OpenXRFeature.CreateSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string)
    OpenXRFeature.StartSubsystem<T>()
    OpenXRFeature.StopSubsystem<T>()
    OpenXRFeature.DestroySubsystem<T>()
    OpenXRFeature.OnEnable()
    OpenXRFeature.OnDisable()
    OpenXRFeature.Awake()
    OpenXRFeature.GetAction(InputAction)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.OpenXR.Features.Meta
    Assembly: Unity.XR.MetaOpenXR.dll
    Syntax
    public class ARSessionFeature : 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-session"
    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
    OpenXRFeature.HookGetInstanceProcAddr(IntPtr)

    OnAppSpaceChange(ulong)

    Called when the reference xrSpace for the app changes.

    Declaration
    protected override void OnAppSpaceChange(ulong xrSpace)
    Parameters
    Type Name Description
    ulong xrSpace

    Handle of the xrSpace

    Overrides
    OpenXRFeature.OnAppSpaceChange(ulong)

    OnInstanceCreate(ulong)

    Called after xrCreateInstance.

    Declaration
    protected override bool OnInstanceCreate(ulong xrInstance)
    Parameters
    Type Name Description
    ulong xrInstance

    Handle of the xrInstance

    Returns
    Type Description
    bool

    Returns true if successful. Returns false otherwise.

    Overrides
    OpenXRFeature.OnInstanceCreate(ulong)

    OnInstanceDestroy(ulong)

    Called before xrDestroyInstance

    Declaration
    protected override void OnInstanceDestroy(ulong xrInstance)
    Parameters
    Type Name Description
    ulong xrInstance

    Handle of the xrInstance

    Overrides
    OpenXRFeature.OnInstanceDestroy(ulong)

    OnSessionCreate(ulong)

    Called after xrCreateSession.

    Declaration
    protected override void OnSessionCreate(ulong xrSession)
    Parameters
    Type Name Description
    ulong xrSession

    Handle of the xrSession

    Overrides
    OpenXRFeature.OnSessionCreate(ulong)

    OnSessionDestroy(ulong)

    Called before xrDestroySession.

    Declaration
    protected override void OnSessionDestroy(ulong xrSession)
    Parameters
    Type Name Description
    ulong xrSession

    Handle of the xrSession

    Overrides
    OpenXRFeature.OnSessionDestroy(ulong)

    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
    OpenXRFeature.OnSessionStateChange(int, int)

    OnSubsystemCreate()

    Instantiates Meta OpenXR Session subsystem instance, but does not start it. (Start/Stop is typically handled by AR Foundation managers.)

    Declaration
    protected override void OnSubsystemCreate()
    Overrides
    UnityEngine.XR.OpenXR.Features.OpenXRFeature.OnSubsystemCreate()

    OnSubsystemDestroy()

    Destroys the session subsystem.

    Declaration
    protected override void OnSubsystemDestroy()
    Overrides
    UnityEngine.XR.OpenXR.Features.OpenXRFeature.OnSubsystemDestroy()

    OnSystemChange(ulong)

    Called after xrGetSystem.

    Declaration
    protected override void OnSystemChange(ulong xrSystem)
    Parameters
    Type Name Description
    ulong xrSystem

    Handle of the xrSystemId

    Overrides
    OpenXRFeature.OnSystemChange(ulong)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)