API reference
API reference
Select your platform
No SDKs available
No versions available

Tracker Class

Extends IDisposable
Represents system resources related to trackable anchors.
A "trackable" is a type of anchor that can be detected at runtime.
When you create a new Tracker, you must then "configure" it using ConfigureAsync.
When you no longer need a realtime tracker, you should disable trackers by disposing the Tracker (see Dispose).

Properties

The current configuration for this Tracker.
This property may differ from what was last requested with ConfigureAsync if one or more of the requested configuration options was not able to be satisfied. This represents the current state of the tracker.

Member Functions

Configures this Tracker with the specified configuration .
It is possible for some configuration options to be satisfied while others are not, if, for example, one type of tracking is supported while another is not. In this case, ConfigureAsync will return something other than success (OVRResult<T>.Success) even though some options have been satisfied.Configuration represents the current state of the tracker at any given time; use this to determine the current configuration.
Parameters
configuration
The configuration this tracker should use.
Returns
Returns an async task representing the state and eventual result of the operation.
Fetch anchors that match the TrackableType according to the current Configuration.
This method queries for anchors may be detected according to the current Configuration.Anchors may be returned in batches. If incrementalResultsCallback is not null, then this delegate is invoked whenever results become available prior to the completion of the entire operation. New anchors are appended to anchors . The delegate receives a reference to anchors and the starting index of the anchors that have been added. The parameters are:
  • anchors: The same List provided by anchors .
  • index: The starting index of the newly available anchors
This is similar to calling OVRAnchor.FetchTrackablesAsync(List<OVRAnchor>,IEnumerable<TrackableType>,Action<List<OVRAnchor>,int>) with an array of TrackableType. You can get the trackables associated with a TrackerConfiguration with TrackerConfiguration.GetTrackableTypes.
Parameters
anchors
Container to store the results. The list is cleared before adding any anchors.
incrementalResultsCallback
(Optional) A callback invoked when incremental results are available.
Returns
Returns an OVRTask that can be used to track the asynchronous fetch.
Exceptions
ArgumentNullException
Thrown if anchors is null.
Disposes of the Tracker.
When you Dispose a Tracker, it stops tracking all trackables indicated by its Tracker.Configuration and destroys any internal resources associated with the tracker.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon