Description
The TrackedDeviceRole.Unknown
field is a member of the TrackedDeviceRole
enumeration within the Sandbox.VR
namespace. It represents a device role that is not recognized or specified. This can be used as a default or placeholder value when the role of a tracked device is not determined.
Usage
Use TrackedDeviceRole.Unknown
when you need to handle cases where the role of a VR tracked device is not known or cannot be categorized into any of the predefined roles. This can be useful for error handling or logging purposes.
Example
// Example of using TrackedDeviceRole.Unknown
public void HandleDeviceRole(TrackedDeviceRole role)
{
switch (role)
{
case TrackedDeviceRole.LeftHand:
// Handle left hand
break;
case TrackedDeviceRole.RightHand:
// Handle right hand
break;
// Other cases...
case TrackedDeviceRole.Unknown:
default:
// Handle unknown role
LogWarning("Unknown device role detected.");
break;
}
}