Description
The TrackedDeviceType.Invalid
field is a member of the TrackedDeviceType
enumeration within the Sandbox.VR
namespace. It represents an invalid or unrecognized tracked device type. This value is typically used to indicate that a device ID is not valid or does not correspond to any known tracked device type.
Usage
Use TrackedDeviceType.Invalid
when you need to handle cases where a device ID is not recognized or does not match any of the predefined tracked device types. This can be useful for error handling or validation logic in VR applications.
Example
// Example of using TrackedDeviceType.Invalid
void HandleDeviceType(TrackedDeviceType deviceType)
{
if (deviceType == TrackedDeviceType.Invalid)
{
// Handle invalid device type
Log.Warning("Received an invalid tracked device type.");
}
else
{
// Handle valid device types
Log.Info($"Handling device type: {deviceType}");
}
}