docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class XRReferencePointSubsystem.Provider

    An interface to be implemented by providers of this subsystem.

    Inheritance
    object
    SubsystemProvider
    SubsystemProvider<XRReferencePointSubsystem>
    XRReferencePointSubsystem.Provider
    Inherited Members
    SubsystemProvider<XRReferencePointSubsystem>.TryInitialize()
    SubsystemProvider.running
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public abstract class XRReferencePointSubsystem.Provider : SubsystemProvider<XRReferencePointSubsystem>

    Methods

    Destroy()

    Called when Destroy is called on the subsystem.

    Declaration
    public override void Destroy()
    Overrides
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem>.Destroy()

    GetChanges(XRReferencePoint, Allocator)

    Invoked to get the changes to reference points (added, updated, and removed) since the last call to GetChanges(XRReferencePoint, Allocator).

    Declaration
    public abstract TrackableChanges<XRReferencePoint> GetChanges(XRReferencePoint defaultReferencePoint, Allocator allocator)
    Parameters
    Type Name Description
    XRReferencePoint defaultReferencePoint

    The default reference point. This should be used to initialize the returned NativeArrays for backwards compatibility. See TrackableChanges(void*, int, void*, int, void*, int, T, int, Allocator).

    Allocator allocator

    An allocator to use for the NativeArrays in TrackableChanges<T>.

    Returns
    Type Description
    TrackableChanges<XRReferencePoint>

    Changes since the last call to GetChanges(XRReferencePoint, Allocator).

    Start()

    Invoked when Start is called on the subsystem. This method is only called if the subsystem was not previously running.

    Declaration
    public override void Start()
    Overrides
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem>.Start()

    Stop()

    Invoked when Stop is called on the subsystem. This method is only called if the subsystem was previously running.

    Declaration
    public override void Stop()
    Overrides
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRReferencePointSubsystem>.Stop()

    TryAddReferencePoint(Pose, out XRReferencePoint)

    Should create a new reference point with the provide pose.

    Declaration
    public virtual bool TryAddReferencePoint(Pose pose, out XRReferencePoint referencePoint)
    Parameters
    Type Name Description
    Pose pose

    The pose, in session space, of the new reference point.

    XRReferencePoint referencePoint

    The new reference point. Must be valid only if this method returns true.

    Returns
    Type Description
    bool

    Should return true if the new reference point was added, otherwise false.

    TryAttachReferencePoint(TrackableId, Pose, out XRReferencePoint)

    Should create a new reference attached to the trackable with id trackableToAffix. The behavior of the reference point depends on the type of trackable to which this reference point is attached and can be implemenation-defined.

    Declaration
    public virtual bool TryAttachReferencePoint(TrackableId trackableToAffix, Pose pose, out XRReferencePoint referencePoint)
    Parameters
    Type Name Description
    TrackableId trackableToAffix

    The id of the trackable to which to attach.

    Pose pose

    The pose, in session space, of the reference point to create.

    XRReferencePoint referencePoint

    The new reference point. Must be valid only if this method returns true.

    Returns
    Type Description
    bool

    true if the new reference point was added, otherwise false.

    TryRemoveReferencePoint(TrackableId)

    Should remove an existing reference point with TrackableId referencePointId.

    Declaration
    public virtual bool TryRemoveReferencePoint(TrackableId referencePointId)
    Parameters
    Type Name Description
    TrackableId referencePointId

    The id of an existing reference point to remove.

    Returns
    Type Description
    bool

    Should return true if the reference point was removed, otherwise false. If the reference point does not exist, return false.

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