Loads up to 50 unbound anchors with specified UUIDs.
An
UnboundAnchor is an anchor that exists, but that isn't managed by an
OVRSpatialAnchor. Use this method to load a collection of anchors by UUID that haven't already been bound to an
OVRSpatialAnchor.In order to be loaded, the anchor must have previously been persisted, e.g., with
SaveAnchorsAsync.NOTE: This method will only process the first 50 UUIDs provided by
uuids .This method is asynchronous. The returned OVRTask<TResult> completes when all results are available. However, anchors may be loaded in batches. To be notified as the results of individual batches are loaded, provide an
onIncrementalResultsAvailable callback. The callback accepts two parameters:
(List\<UnboundAnchor\> unboundAnchors, int startingIndex)
unboundAnchors is a reference to the unboundAnchors parameter.
startingIndex is the index into unboundAnchors which contains the first newly loaded anchor in this batch.
Before the task completes, it is undefined behavior to access
unboundAnchors outside of onIncrementalResultsAvailable invocations.Note that if you bind an
UnboundAnchor in the onIncrementalResultsAvailable callback, that same anchor will no longer be present in the
unboundAnchors provided to future incremental results, or after the task completes. That is, an
UnboundAnchor is removed from the list of
unboundAnchors once it is bound.
unboundAnchors is the buffer used to store the results. This allows you to reuse the same buffer between subsequent calls. The list is cleared before any anchors are added to it.
ParametersuuidsThe UUIDs of the anchors to load.
unboundAnchorsThe buffer to store the resulting unbound anchors into.
onIncrementalResultsAvailableAn optional callback that is invoked whenever a new batch of unbound anchors has been loaded.
ReturnsA new OVRTask<TResult> that completes when the loading operation completes.
ExceptionsArgumentNullExceptionThrown if uuids is null.
ArgumentNullExceptionThrown if unboundAnchors is null.