docs.unity3d.com
    Show / Hide Table of Contents

    Class XRReferencePointSubsystem.Provider

    An interface to be implemented by providers of this subsystem.

    Inheritance
    Object
    XRReferencePointSubsystem.Provider
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class Provider

    Methods

    Destroy()

    Called when Destroy is called on the subsystem.

    Declaration
    public virtual void 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*, Int32, Void*, Int32, Void*, Int32, T, Int32, 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 virtual void Start()

    Stop()

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

    Declaration
    public virtual void 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
    Boolean

    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 may 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
    Boolean

    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
    Boolean

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

    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