Class LostTrackingService
A service that detects when tracking is lost on WSA devices. When tracking is lost, the service displays a visual indicator and sets the main camera's culling mask to hide all other objects. When tracking is restored, the camera mask is restored and the visual indicator is hidden.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Extensions.Tracking
Assembly: cs.temp.dll.dll
Syntax
public class LostTrackingService : BaseExtensionService, ILostTrackingService, IMixedRealityExtensionService, IMixedRealityService, IDisposable
Constructors
LostTrackingService(IMixedRealityServiceRegistrar, String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
public LostTrackingService(IMixedRealityServiceRegistrar registrar, string name, uint priority, BaseMixedRealityProfile profile)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | The IMixedRealityServiceRegistrar instance that loaded the service. |
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
LostTrackingService(String, UInt32, BaseMixedRealityProfile)
Constructor.
Declaration
public LostTrackingService(string name, uint priority, BaseMixedRealityProfile profile)
Parameters
Type | Name | Description |
---|---|---|
String | name | Friendly name of the service. |
UInt32 | priority | Service priority. Used to determine order of instantiation. |
BaseMixedRealityProfile | profile | The service's configuration profile. |
Properties
OnTrackingLost
Called when tracking is lost. (When UnityEngine.VR.WSA.PositionalLocatorState is Inhibited.)
Declaration
public Action OnTrackingLost { get; set; }
Property Value
Type | Description |
---|---|
Action |
OnTrackingRestored
Called when tracking is stored (UnityEngine.VR.WSA.PositionalLocatorState is anything other than Inhibited.)
Declaration
public Action OnTrackingRestored { get; set; }
Property Value
Type | Description |
---|---|
Action |
TrackingLost
True if tracking is lost, false if tracking is present.
Declaration
public bool TrackingLost { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Initialize()
The initialize function is used to setup the service once created. This method is called once all services have been registered in the Mixed Reality Toolkit.
Declaration
public override void Initialize()