docs.unity3d.com
    Show / Hide Table of Contents

    Class ARReferencePointManager

    Manages reference points.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>
    ARReferencePointManager
    Inherited Members
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.trackables
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.SetTrackablesActive(Boolean)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.sessionOrigin
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.gameObjectName
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.GetPrefab()
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.m_Trackables
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.m_PendingAdds
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.Awake()
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.OnEnable()
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.OnDisable()
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.CanBeAddedToSubsystem(ARReferencePoint)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.Update()
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.OnTrackablesChanged(List<ARReferencePoint>, List<ARReferencePoint>, List<ARReferencePoint>)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.OnCreateTrackable(ARReferencePoint)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.OnAfterSetSessionRelativeData(ARReferencePoint, XRReferencePoint)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.CreateTrackableImmediate(XRReferencePoint)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.DestroyPendingTrackable(TrackableId)
    ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>.CreateTrackableFromExisting(ARReferencePoint, XRReferencePoint)
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.subsystem
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.descriptor
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.GetActiveSubsystemInstance()
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.EnsureSubsystemInstanceSet()
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.OnEnable()
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.OnDisable()
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.OnDestroy()
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.OnBeforeStart()
    SubsystemLifecycleManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor>.OnAfterStart()
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    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, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, 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
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    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, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.XR.ARFoundation
    Syntax
    [DisallowMultipleComponent]
    [RequireComponent(typeof(ARSessionOrigin))]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/api/UnityEngine.XR.ARFoundation.ARReferencePointManager.html")]
    [Obsolete("ARReferencePointManager has been deprecated. Use ARAnchorManager instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager", true)]
    public sealed class ARReferencePointManager : ARTrackableManager<XRReferencePointSubsystem, XRReferencePointSubsystemDescriptor, XRReferencePoint, ARReferencePoint>
    Remarks

    Use this component to programmatically add, remove, or query for reference points. Reference points are Poses in the world which will be periodically updated by an AR device as its understanding of the world changes.

    Subscribe to changes (added, updated, and removed) via the referencePointsChanged event.

    Properties

    gameObjectName

    The name given to each GameObject associated with each ARReferencePoint.

    Declaration
    protected override string gameObjectName { get; }
    Property Value
    Type Description
    String
    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem, UnityEngine.XR.ARSubsystems.XRReferencePointSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRReferencePoint, UnityEngine.XR.ARFoundation.ARReferencePoint>.gameObjectName

    referencePointPrefab

    This prefab will be instantiated for each ARReferencePoint. May be null.

    Declaration
    [Obsolete("ARReferencePointManger.referencePointPrefab has been renamed. Use ARAnchorManager.anchorPrefab instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.anchorPrefab", true)]
    public GameObject referencePointPrefab { get; set; }
    Property Value
    Type Description
    GameObject

    Methods

    AddReferencePoint(Pose)

    Attempts to add an ARReferencePoint with the given Pose.

    Declaration
    [Obsolete("ARReferencePointManger.AddReferencePoint() has been deprecated. Use ARAnchorManager.AddAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.AddAnchor(*)", true)]
    public ARReferencePoint AddReferencePoint(Pose pose)
    Parameters
    Type Name Description
    Pose pose

    The pose, in Unity world space, of the ARReferencePoint.

    Returns
    Type Description
    ARReferencePoint

    A new ARReferencePoint if successful, otherwise null.

    Remarks

    If GetPrefab() is not null, a new instance of that prefab will be instantiated. Otherwise, a new GameObject will be created. In either case, the resulting GameObject will have an ARReferencePoint component on it.

    AttachReferencePoint(ARPlane, Pose)

    Attempts to create a new reference point that is attached to an existing ARPlane.

    Declaration
    [Obsolete("ARReferencePointManger.AttachReferencePoint() has been deprecated. Use ARAnchorManager.AttachAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.AttachAnchor(*)", true)]
    public ARReferencePoint AttachReferencePoint(ARPlane plane, Pose pose)
    Parameters
    Type Name Description
    ARPlane plane

    The ARPlane to which to attach.

    Pose pose

    The initial Pose, in Unity world space, of the reference point.

    Returns
    Type Description
    ARReferencePoint

    A new ARReferencePoint if successful, otherwise null.

    GetPrefab()

    Gets the prefab that will be instantiated for each ARReferencePoint.

    Declaration
    protected override GameObject GetPrefab()
    Returns
    Type Description
    GameObject

    The prefab that will be instantiated for each ARReferencePoint.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem, UnityEngine.XR.ARSubsystems.XRReferencePointSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRReferencePoint, UnityEngine.XR.ARFoundation.ARReferencePoint>.GetPrefab()

    GetReferencePoint(TrackableId)

    Gets the ARReferencePoint with given trackableId, or null if it does not exist.

    Declaration
    [Obsolete("ARReferencePointManger.GetReferencePoint() has been deprecated. Use ARAnchorManager.GetAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.GetAnchor(*)", true)]
    public ARReferencePoint GetReferencePoint(TrackableId trackableId)
    Parameters
    Type Name Description
    TrackableId trackableId

    The TrackableId of the ARReferencePoint to retrieve.

    Returns
    Type Description
    ARReferencePoint

    The ARReferencePoint with trackableId or null if it does not exist.

    OnTrackablesChanged(List<ARReferencePoint>, List<ARReferencePoint>, List<ARReferencePoint>)

    Invoked when the base class detects trackable changes.

    Declaration
    protected override void OnTrackablesChanged(List<ARReferencePoint> added, List<ARReferencePoint> updated, List<ARReferencePoint> removed)
    Parameters
    Type Name Description
    List<ARReferencePoint> added

    The list of added ARReferencePoints.

    List<ARReferencePoint> updated

    The list of updated ARReferencePoints.

    List<ARReferencePoint> removed

    The list of removed ARReferencePoints.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem, UnityEngine.XR.ARSubsystems.XRReferencePointSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRReferencePoint, UnityEngine.XR.ARFoundation.ARReferencePoint>.OnTrackablesChanged(System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARReferencePoint>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARReferencePoint>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARReferencePoint>)

    RemoveReferencePoint(ARReferencePoint)

    Attempts to remove an ARReferencePoint.

    Declaration
    [Obsolete("ARReferencePointManger.RemoveReferencePoint() has been deprecated. Use ARAnchorManager.RemoveAnchor() instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.RemoveAnchor(*)", true)]
    public bool RemoveReferencePoint(ARReferencePoint referencePoint)
    Parameters
    Type Name Description
    ARReferencePoint referencePoint

    The reference point you wish to remove.

    Returns
    Type Description
    Boolean

    True if the reference point was successfully removed. False usually means the reference point is not longer tracked by the system.

    Events

    referencePointsChanged

    Invoked once per frame to communicate changes to reference points, including new reference points, the update of existing reference points, and the removal of previously existing reference points.

    Declaration
    [Obsolete("ARReferencePointManger.referencePointsChanged has been renamed. Use ARAnchorManager.anchorsChanged instead (UnityUpgradable) -> UnityEngine.XR.ARFoundation.ARAnchorManager.anchorsChanged", true)]
    public event Action<ARReferencePointsChangedEventArgs> referencePointsChanged
    Event Type
    Type Description
    Action<ARReferencePointsChangedEventArgs>

    See Also

    ARTrackableManager<TSubsystem, TSubsystemDescriptor, TSessionRelativeData, TTrackable>
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023