{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class ARTrackableManager<TSubsystem, TSubsystemDescriptor, TProvider, TSessionRelativeData, TTrackable> | AR Foundation | 4.2.9
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ARTrackableManager<TSubsystem, TSubsystemDescriptor, TProvider, TSessionRelativeData, TTrackable>

    A generic manager for components generated by features detected in the physical environment.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>
    ARTrackableManager<TSubsystem, TSubsystemDescriptor, TProvider, TSessionRelativeData, TTrackable>
    ARAnchorManager
    AREnvironmentProbeManager
    ARFaceManager
    ARHumanBodyManager
    ARParticipantManager
    ARPlaneManager
    ARPointCloudManager
    ARRaycastManager
    ARReferencePointManager
    ARTrackedImageManager
    ARTrackedObjectManager
    Inherited Members
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.subsystem
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.descriptor
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.GetActiveSubsystemInstance()
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.EnsureSubsystemInstanceSet()
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.OnEnable()
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.OnDisable()
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.OnDestroy()
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.OnBeforeStart()
    SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider>.OnAfterStart()
    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<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    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>(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.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARFoundation
    Assembly: solution.dll
    Syntax
    [RequireComponent(typeof(ARSessionOrigin))]
    [DisallowMultipleComponent]
    public abstract class ARTrackableManager<TSubsystem, TSubsystemDescriptor, TProvider, TSessionRelativeData, TTrackable> : SubsystemLifecycleManager<TSubsystem, TSubsystemDescriptor, TProvider> where TSubsystem : TrackingSubsystem<TSessionRelativeData, TSubsystem, TSubsystemDescriptor, TProvider>, new() where TSubsystemDescriptor : SubsystemDescriptorWithProvider<TSubsystem, TProvider> where TProvider : SubsystemProvider<TSubsystem> where TSessionRelativeData : struct, ITrackable where TTrackable : ARTrackable<TSessionRelativeData, TTrackable>
    Type Parameters
    Name Description
    TSubsystem

    The Subsystem which provides this manager data.

    TSubsystemDescriptor

    The SubsystemDescriptor required to create the Subsystem.

    TProvider

    The provider associated with the TSubsystem.

    TSessionRelativeData

    A concrete struct used to hold data provided by the Subsystem.

    TTrackable

    The type of component that this component will manage (that is, create, update, and destroy).

    Remarks

    When the manager is informed that a trackable has been added, a new GameObject is created with an ARTrackable component on it. If ARTrackableManager<TSubsystem, TSubsystemDescriptor, TProvider, TSessionRelativeData, TTrackable> is not null, then that Prefab will be instantiated.

    Fields

    Name Description
    m_PendingAdds

    A dictionary of trackables added via CreateTrackableImmediate(TSessionRelativeData) but not yet reported as added.

    m_Trackables

    A dictionary of all trackables, keyed by TrackableId.

    Properties

    Name Description
    gameObjectName

    The name prefix that should be used when instantiating new GameObjects.

    sessionOrigin

    The ARSessionOrigin which will be used to instantiate detected trackables.

    trackables

    A collection of all trackables managed by this component.

    Methods

    Name Description
    Awake()

    Invoked by Unity once when this component wakes up.

    CanBeAddedToSubsystem(TTrackable)

    Determines whether an existing ARTrackable<TSessionRelativeData, TTrackable> can be added to the underlying subsystem.

    CreateTrackableFromExisting(TTrackable, TSessionRelativeData)

    Creates the native counterpart for an existing ARTrackable<TSessionRelativeData, TTrackable> added with a call to AddComponent, for example.

    CreateTrackableImmediate(TSessionRelativeData)

    Creates a TTrackable immediately and leaves it in a "pending" state.

    DestroyPendingTrackable(TrackableId)

    If in a "pending" state and destroyOnRemoval is true, this method destroys the trackable's GameObject. Otherwise, this method has no effect.

    GetPrefab()

    The Prefab that should be instantiated when adding a trackable. Can be null.

    OnAfterSetSessionRelativeData(TTrackable, TSessionRelativeData)

    Invoked just after session-relative data has been set on a trackable.

    OnCreateTrackable(TTrackable)

    Invoked after creating the trackable. The trackable's sessionRelativeData property will already be set.

    OnDisable()

    Stops the TSubsystem.

    OnEnable()

    Creates the TSubsystem.

    OnTrackablesChanged(List<TTrackable>, List<TTrackable>, List<TTrackable>)

    Invoked when trackables have change (that is, they were added, updated, or removed). Use this to perform additional logic, or to invoke public events related to your trackables.

    SetTrackablesActive(bool)

    Iterates over every instantiated ARTrackable<TSessionRelativeData, TTrackable> and activates or deactivates its GameObject based on the value of active. This calls GameObject.SetActive on each trackable's GameObject.

    Update()

    Update is called once per frame. This component's internal state is first updated, and then an event notifying whether any trackables have been added, removed, or updated is invoked by the derived manager.

    In This Article
    Back to top
    Copyright © 2023 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)