Stay organized with collections
Save and categorize content based on your preferences.
XRShareableAnchor
Represents a shareable anchor trackable by the shareable anchor subsystem.
Summary
Inheritance
Inherits from:
ITrackable,
IEquatable< XRShareableAnchor >
Constructors and Destructors
|
XRShareableAnchor(TrackableId id, Pose pose, TrackingState state, IntPtr nativePtr, TrackableId parentId, XRShareableAnchorHosts host, SerializableGuid shareableId)
|
XRShareableAnchor(TrackableId id, Pose pose, TrackingState state, IntPtr nativePtr, TrackableId parentId)
Constructs a default anchor.
|
Public static attributes
|
defaultValue =>
new XRShareableAnchor(
TrackableId.invalidId,
Pose.identity,
TrackingState.None,
IntPtr.Zero,
TrackableId.invalidId)
|
|
Public attributes
|
host => _host
|
Gets the host of this shareable anchor.
|
nativePtr => _nativePtr
|
IntPtr
Gets a native pointer to additional provider-specific data.
|
parentId => _parentId
|
TrackableId
Gets the TrackableId of the parent of this tracked object.
|
pose => _pose
|
Pose
Gets the pose of the shareable anchor in the Unity world space.
|
shareableId => _shareableId
|
SerializableGuid
Gets the shareable ID to retrieve the anchor from other clients.
|
trackableId => _trackableId
|
TrackableId
Gets the unique identifier for this shareable anchor.
|
trackingState => _state
|
TrackingState
Gets the current tracking state of the shareable anchor.
|
Public static attributes
defaultValue
XRShareableAnchor Google::XR::Extensions::ARSubsystems::XRShareableAnchor::defaultValue =>
new XRShareableAnchor(
TrackableId.invalidId,
Pose.identity,
TrackingState.None,
IntPtr.Zero,
TrackableId.invalidId)
Public attributes
host
XRShareableAnchorHosts Google::XR::Extensions::ARSubsystems::XRShareableAnchor::host => _host
Gets the host of this shareable anchor.
nativePtr
IntPtr Google::XR::Extensions::ARSubsystems::XRShareableAnchor::nativePtr => _nativePtr
Gets a native pointer to additional provider-specific data.
May be IntPtr.Zero.
parentId
TrackableId Google::XR::Extensions::ARSubsystems::XRShareableAnchor::parentId => _parentId
Gets the TrackableId of the parent of this tracked object.
May be TrackableId.invalidId.
pose
Pose Google::XR::Extensions::ARSubsystems::XRShareableAnchor::pose => _pose
Gets the pose of the shareable anchor in the Unity world space.
shareableId
SerializableGuid Google::XR::Extensions::ARSubsystems::XRShareableAnchor::shareableId => _shareableId
Gets the shareable ID to retrieve the anchor from other clients.
trackableId
TrackableId Google::XR::Extensions::ARSubsystems::XRShareableAnchor::trackableId => _trackableId
Gets the unique identifier for this shareable anchor.
trackingState
TrackingState Google::XR::Extensions::ARSubsystems::XRShareableAnchor::trackingState => _state
Gets the current tracking state of the shareable anchor.
Public functions
Equals
bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::Equals(
XRShareableAnchor other
)
Indicates whether every field in this XRShareableAnchor is equal to the corresponding field in other .
| Details |
| Parameters |
|
|
Returns
|
Returns true if all properties match. Otherwise, returns false.
|
Equals
override bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::Equals(
object obj
)
GetHashCode
override int Google::XR::Extensions::ARSubsystems::XRShareableAnchor::GetHashCode()
UpdateHost
void Google::XR::Extensions::ARSubsystems::XRShareableAnchor::UpdateHost(
XRShareableAnchorHosts host,
SerializableGuid shareableId
)
Updates host information for a default anchor.
| Details |
| Parameters |
host
|
The host of this shareable anchor.
|
shareableId
|
The shareable identifier of this anchor.
|
|
XRShareableAnchor
Google::XR::Extensions::ARSubsystems::XRShareableAnchor::XRShareableAnchor(
TrackableId id,
Pose pose,
TrackingState state,
IntPtr nativePtr,
TrackableId parentId,
XRShareableAnchorHosts host,
SerializableGuid shareableId
)
Constructs a new XRShareableAnchor.
| Details |
| Parameters |
id
|
The unique identifier for this shareable anchor.
|
pose
|
The pose of the shareable anchor in the Unity world space.
|
state
|
The current tracking state of the shareable anchor.
|
nativePtr
|
Provider-specific native pointer, or IntPtr.Zero.
|
parentId
|
The TrackableId of the parent of this tracked object, or TrackableId.invalidId.
|
host
|
The host of this shareable anchor.
|
shareableId
|
The shareable identifier of this anchor.
|
|
XRShareableAnchor
Google::XR::Extensions::ARSubsystems::XRShareableAnchor::XRShareableAnchor(
TrackableId id,
Pose pose,
TrackingState state,
IntPtr nativePtr,
TrackableId parentId
)
Constructs a default anchor.
| Details |
| Parameters |
id
|
The unique identifier for this shareable anchor.
|
pose
|
The pose of the shareable anchor in the Unity world space.
|
state
|
The current tracking state of the shareable anchor.
|
nativePtr
|
Provider-specific native pointer, or IntPtr.Zero.
|
parentId
|
The TrackableId of the parent of this tracked object, or TrackableId.invalidId.
|
|
Public static functions
operator!=
bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::operator!=(
XRShareableAnchor left,
XRShareableAnchor right
)
Determines whether two XRShareableAnchor instances have different property values.
| Details |
| Parameters |
left
|
The first trackable to compare.
|
right
|
The second trackable to compare.
|
|
|
Returns
|
Returns true if any property differs. Otherwise, returns false.
|
operator==
bool Google::XR::Extensions::ARSubsystems::XRShareableAnchor::operator==(
XRShareableAnchor left,
XRShareableAnchor right
)
Determines whether two XRShareableAnchor instances have exactly the same property values.
| Details |
| Parameters |
left
|
The first trackable to compare.
|
right
|
The second trackable to compare.
|
|
|
Returns
|
Returns true if all properties match. Otherwise, returns false.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-10-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-10-28 UTC."],[],[]]