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

    Class XRAnchorSubsystem

    Base class for an anchor subsystem.

    Inheritance
    Object
    SubsystemWithProvider
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>
    TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>
    XRAnchorSubsystem
    Inherited Members
    TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>.GetChanges(Allocator)
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.OnCreate()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.OnStart()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.OnStop()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.OnDestroy()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.subsystemDescriptor
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider<UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.provider
    SubsystemWithProvider.Start()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider.OnStart()
    SubsystemWithProvider.Stop()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider.OnStop()
    SubsystemWithProvider.Destroy()
    UnityEngine.SubsystemsImplementation.SubsystemWithProvider.OnDestroy()
    SubsystemWithProvider.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 class XRAnchorSubsystem : TrackingSubsystem<XRAnchor, XRAnchorSubsystem, XRAnchorSubsystemDescriptor, XRAnchorSubsystem.Provider>, ISubsystem
    Remarks

    An anchor is a pose in the physical environment that is tracked by an XR device. As the device refines its understanding of the environment, anchors will be updated, allowing you to keep virtual content connected to a real-world position and orientation.

    This abstract class should be implemented by an XR provider and instantiated using the SubsystemManager to enumerate the available XRAnchorSubsystemDescriptors.

    Constructors

    XRAnchorSubsystem()

    Constructor. Do not invoke directly; use the SubsystemManager to enumerate the available XRAnchorSubsystemDescriptors and call Create on the desired descriptor.

    Declaration
    public XRAnchorSubsystem()

    Methods

    GetChanges(Allocator)

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

    Declaration
    public override TrackableChanges<XRAnchor> GetChanges(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

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

    Returns
    Type Description
    TrackableChanges<XRAnchor>

    Changes since the last call to GetChanges(Allocator).

    Overrides
    UnityEngine.XR.ARSubsystems.TrackingSubsystem<UnityEngine.XR.ARSubsystems.XRAnchor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem, UnityEngine.XR.ARSubsystems.XRAnchorSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRAnchorSubsystem.Provider>.GetChanges(Unity.Collections.Allocator)

    TryAddAnchor(Pose, out XRAnchor)

    Attempts to create a new anchor with the provide pose.

    Declaration
    public 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. Only valid if this method returns true.

    Returns
    Type Description
    Boolean

    true if the new anchor was added, otherwise false.

    TryAttachAnchor(TrackableId, Pose, out XRAnchor)

    Attempts to 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.

    Declaration
    public 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. Only valid if this method returns true.

    Returns
    Type Description
    Boolean

    true if the new anchor was added, otherwise false.

    TryRemoveAnchor(TrackableId)

    Attempts to remove an existing anchor with TrackableId anchorId.

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

    The id of an existing anchor to remove.

    Returns
    Type Description
    Boolean

    true if the anchor was removed, otherwise false.

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