Class ARCoreAnchorSubsystem
The ARCore implementation of the XRAnchorSubsystem. Do not create this directly. Use the SubsystemManager instead.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.ARCore
Assembly: Unity.XR.ARCore.dll
Syntax
[Preserve]
public sealed class ARCoreAnchorSubsystem : XRAnchorSubsystem, ISubsystem
Methods
EstimateFeatureMapQualityForHosting(TrackableId, ref ArFeatureMapQuality)
Returns the quality of feature points seen in the preceding few seconds from a given anchor. Refer to ARCore docs for more information: https://developers.google.com/ar/develop/c/cloud-anchors/developer-guide#check_the_mapping_quality_of_feature_points
Declaration
public XRResultStatus EstimateFeatureMapQualityForHosting(TrackableId anchorId, ref ArFeatureMapQuality quality)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | anchorId | The ID of the anchor |
ArFeatureMapQuality | quality | The feature map quality of the anchor |
Returns
Type | Description |
---|---|
XRResultStatus | The result status |
TrySaveAnchorWithLifespanAsync(TrackableId, uint, CancellationToken)
Attempts to persistently save the given anchor so that it can be loaded in a future AR session. This method takes a lifespan parameter that indicates how long the anchor should persist for. The platform may have a maximum lifespan that cannot be exceeded.
Declaration
public Awaitable<Result<SerializableGuid>> TrySaveAnchorWithLifespanAsync(TrackableId anchorId, uint lifespan, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | anchorId | The TrackableId of the anchor to save. |
uint | lifespan | The lifespan (in days) of the anchor. |
CancellationToken | cancellationToken | An optional |
Returns
Type | Description |
---|---|
Awaitable<Result<SerializableGuid>> | The result of the async operation, containing a new persistent anchor GUID if the operation succeeded. You are responsible to await this result. |