docs.unity3d.com
    目次を表示する/隠す

    Class XRAnchorSubsystem.Provider

    An abstract class to be implemented by providers of this subsystem.

    Inheritance
    Object
    SubsystemProvider
    UnityEngine.SubsystemsImplementation.SubsystemProvider<XRAnchorSubsystem>
    XRAnchorSubsystem.Provider
    Inherited Members
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem>.TryInitialize()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem>.Start()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem>.Stop()
    UnityEngine.SubsystemsImplementation.SubsystemProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem>.Destroy()
    UnityEngine.SubsystemsImplementation.SubsystemProvider.running
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class Provider : SubsystemProvider<XRAnchorSubsystem>

    Methods

    GetChanges(XRAnchor, Allocator)

    Invoked to get the changes to anchors (added, updated, and removed) since the last call to GetChanges(XRAnchor, Allocator).

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

    The default anchor. 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<XRAnchor>

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

    TryAddAnchor(Pose, out XRAnchor)

    Should create a new anchor with the provided pose.

    Declaration
    public virtual bool TryAddAnchor(Pose pose, out XRAnchor anchor)
    Parameters
    Type Name Description
    Pose pose

    The pose, in session space, of the new anchor.

    XRAnchor anchor

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

    Returns
    Type Description
    Boolean

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

    TryAttachAnchor(TrackableId, Pose, out XRAnchor)

    Should create a new anchor "attached" to the trackable with id trackableToAffix. The behavior of the anchor depends on the type of trackable to which this anchor is attached and might be implementation-defined.

    Declaration
    public virtual bool TryAttachAnchor(TrackableId trackableToAffix, Pose pose, out XRAnchor anchor)
    Parameters
    Type Name Description
    TrackableId trackableToAffix

    The id of the trackable to which to attach.

    Pose pose

    The pose, in session space, of the anchor to create.

    XRAnchor anchor

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

    Returns
    Type Description
    Boolean

    true if the new anchor was added, otherwise false.

    TryRemoveAnchor(TrackableId)

    Should remove an existing anchor with TrackableId anchorId.

    Declaration
    public virtual bool TryRemoveAnchor(TrackableId anchorId)
    Parameters
    Type Name Description
    TrackableId anchorId

    The id of an existing anchor to remove.

    Returns
    Type Description
    Boolean

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

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)