UxrTrackingDevice Class
Base class for tracking devices.
Inheritance Hierarchy
System.Object
Object
Component
Behaviour
MonoBehaviour
UltimateXR.Core.Components.UxrComponent
UltimateXR.Core.Components.UxrComponent(UxrTrackingDevice)
UltimateXR.Core.Components.Composite.UxrAvatarComponent(UxrTrackingDevice)
UltimateXR.Devices.UxrTrackingDevice
UltimateXR.Devices.UxrControllerTracking
UltimateXR.Devices.UxrHandTracking
Namespace: UltimateXR.Devices
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public abstract class UxrTrackingDevice : UxrAvatarComponent<UxrTrackingDevice>,
IUxrTrackingDevice, IUxrDevice
The UxrTrackingDevice type exposes the following members.
Constructors
Name | Description | |
---|---|---|
UxrTrackingDevice |
Properties
Name | Description | |
---|---|---|
HeadsetDeviceName | Gets the headset device name. | |
SDKDependency | Gets the SDK the implemented device needs in order to be available. It should be null or empty if there is no SDK dependency. Otherwise is should use any of the SDK names in UxrManager. For example if requires the Oculus SDK, it should return SdkOculus. | |
TrackingUpdateOrder | There are cases where more than one tracking device might be active. We use TrackingUpdateOrder for cases where there is one that should be applied after the other(s). For example an Oculus Rift together with a Leap Motion setup has one tracking component for each. But Leap Motion should override the tracking values of the rift controllers if the Leap Motion component is active. In this case Oculus, like most tracking devices, has a value of OrderStandard while Leap Motion has a value of OrderPostprocess so that the tracking devices update the avatar in the correct order. |
Methods
Name | Description | |
---|---|---|
GetHeadsetDevice | Tries to get the connected headset device. | |
OnAvatarUpdated | Event trigger for the AvatarUpdated event. Can be used to override in child classes in order to use the event without subscribing to the parent. | |
OnAvatarUpdating | Event trigger for the AvatarUpdating event. Can be used to override in child classes in order to use the event without subscribing to the parent. | |
OnDestroy | Sets events to null in order to help remove unused references. (Overrides UxrComponent<T>.OnDestroy().) | |
OnDeviceConnected | Event trigger for the DeviceConnected event. Can be used to override in child classes in order to use the event without subscribing to the parent. | |
OnSensorsUpdated | Event trigger for the SensorsUpdated event. Can be used to override in child classes in order to use the event without subscribing to the parent. | |
OnSensorsUpdating | Event trigger for the SensorsUpdating event. Can be used to override in child classes in order to use the event without subscribing to the parent. | |
UpdateAvatar | Overriden in child classes to implement the update of the avatar using the current sensor data. | |
UpdateSensors | Overriden in child classes to implement the update of the current sensor data. |
Events
Name | Description | |
---|---|---|
AvatarUpdated | Event called right after updating an avatar with the current sensor data. | |
AvatarUpdating | Event called right before updating an avatar with the current sensor data. | |
DeviceConnected | Event called whenever the device is connected or disconnected | |
SensorsUpdated | Event called right after updating sensor data. | |
SensorsUpdating | Event called right before updating sensor data. |
Fields
Name | Description | |
---|---|---|
OrderPostprocess | Default update order for post-process tracking devices such as hand-tracking. | |
OrderStandard | Default update order. |
Extension Methods
Name | Description | |
---|---|---|
CheckSetEnabled | Enables/disabled the component if it isn’t enabled already. (Defined by MonoBehaviourExt.) | |
GetOrAddComponent<T> | Gets the Component of a given type. If it doesn’t exist, it is added to the GameObject. (Defined by ComponentExt.) | |
GetPathUnderScene | Gets the full path under current scene, including all parents, but scene name, for the given component. (Defined by ComponentExt.) | |
GetSceneUid | Gets an unique identifier string for the given component. (Defined by ComponentExt.) | |
GetUniqueScenePath | Gets an unique path in the scene for the given component. It will include scene name, sibling and component indices to make it unique. (Defined by ComponentExt.) | |
LoopCoroutine | Creates a coroutine that simplifies executing a loop during a certain amount of time. (Defined by MonoBehaviourExt.) | |
SafeGetComponentInParent<T> | Gets the Component of a given type in the GameObject or any of its parents. It also works on prefabs, where regular GetComponentInParent(Type, Boolean) will not work: https://issuetracker.unity3d.com/issues/getcomponentinparent-is-returning-null-when-the-gameobject-is-a-prefab (Defined by ComponentExt.) | |
ShowInInspector(Boolean) | Overloaded. Controls whether to show the current object in the inspector. (Defined by ObjectExt.) | |
ShowInInspector(Boolean, Boolean) | Overloaded. Controls whether to show the current object in the inspector and whether it is editable. (Defined by ObjectExt.) | |
ThrowIfNull | Throws an exception if the object is null. (Defined by ObjectExt.) |