Description
The Type
property of the TrackedObject
class indicates the specific type of VR device being tracked. This could be a tracker, controller, or any other supported VR device type. It is represented by the TrackedDeviceType
enumeration, which defines the various types of devices that can be tracked in a VR environment.
Usage
To access the type of a tracked VR object, use the Type
property. This property is read-only and provides information about the kind of device the TrackedObject
instance represents.
Example usage:
TrackedObject trackedObject = new TrackedObject();
TrackedDeviceType deviceType = trackedObject.Type;
if (deviceType == TrackedDeviceType.Controller)
{
// Handle controller-specific logic
}
else if (deviceType == TrackedDeviceType.Tracker)
{
// Handle tracker-specific logic
}
Example
TrackedObject trackedObject = new TrackedObject();
TrackedDeviceType deviceType = trackedObject.Type;
if (deviceType == TrackedDeviceType.Controller)
{
// Handle controller-specific logic
}
else if (deviceType == TrackedDeviceType.Tracker)
{
// Handle tracker-specific logic
}