Class ARSession | AR Foundation | 4.2.10
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARSession

    Controls the lifecycle and configuration options for an AR session. There is only one active session. If you have multiple ARSession components, they all communicate to the same session and will conflict with each other.

    Enabling or disabling the ARSession starts or stops the session, respectively.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    SubsystemLifecycleManager<XRSessionSubsystem, XRSessionSubsystemDescriptor, XRSessionSubsystem.Provider>
    ARSession
    Inherited Members
    SubsystemLifecycleManager.subsystem
    SubsystemLifecycleManager.descriptor
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren(bool)
    Component.GetComponentInChildren()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren(bool)
    Component.GetComponentsInChildren(bool, List)
    Component.GetComponentsInChildren()
    Component.GetComponentsInChildren(List)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent(bool)
    Component.GetComponentInParent()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent(bool)
    Component.GetComponentsInParent(bool, List)
    Component.GetComponentsInParent()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List)
    Component.GetComponents(List)
    Component.GetComponents()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate(T)
    Object.Instantiate(T, Vector3, Quaternion)
    Object.Instantiate(T, Vector3, Quaternion, Transform)
    Object.Instantiate(T, Transform)
    Object.Instantiate(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()
    Object.FindObjectsByType(FindObjectsSortMode)
    Object.FindObjectsOfType(bool)
    Object.FindObjectsByType(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType()
    Object.FindObjectOfType(bool)
    Object.FindFirstObjectByType()
    Object.FindAnyObjectByType()
    Object.FindFirstObjectByType(FindObjectsInactive)
    Object.FindAnyObjectByType(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.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.XR.ARFoundation
    Assembly: solution.dll
    Syntax
    [DisallowMultipleComponent]
    [DefaultExecutionOrder(-2147483648)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSession.html")]
    public sealed class ARSession : SubsystemLifecycleManager

    Properties

    Name Description
    attemptUpdate

    If the device supports XR but does not have the necessary software, some platforms allow prompting the user to install or update the software. If attemptUpdate is true, a software update will be attempted. If the appropriate software is not installed or out of date, and attemptUpdate is false, then AR will not be available.

    currentTrackingMode

    Get the current TrackingMode in use by the session.

    frameRate

    Get the number of AR frames produced per second, or null if the frame rate cannot be determined.

    matchFrameRate

    If true, the session will block execution until a new AR frame is available. This property is obsolete. Use matchFrameRateRequested or matchFrameRateEnabled instead.

    matchFrameRateEnabled

    If true, the underlying subsystem will attempt to synchronize the AR frame rate with Unity's.

    matchFrameRateRequested

    If true, the session will block execution until a new AR frame is available and set Application.targetFrameRate to match the native update frequency of the AR session. Otherwise, the AR session is updated independently of the Unity frame.

    notTrackingReason

    The reason AR tracking was lost.

    requestedTrackingMode

    Get or set the TrackingMode for the session.

    state

    The state of the entire system. Use this to determine the status of AR availability and installation.

    Methods

    Name Description
    CheckAvailability()

    Start checking the availability of XR on the current device.

    Install()

    Begin installing AR software on the current device (if supported).

    OnDestroy()

    Invoked when this MonoBehaviour is destroyed. Affects the state.

    OnDisable()

    Invoked when this MonoBehaviour is disabled. Affects the state.

    OnEnable()

    Creates and initializes the session subsystem. Begins checking for availability.

    Reset()

    Resets the AR Session.

    Events

    Name Description
    stateChanged

    This event is invoked whenever the state changes.

    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)