Class XRDeviceDescriptor
Describes an input device: what it can do and how it should be used. These are reported during device connection, and help identify devices and map input data to the right controls.
Namespace: UnityEngine.InputSystem.XR
Assembly: Unity.InputSystem.dll
Syntax
[Serializable]
public class XRDeviceDescriptor
Fields
characteristics
The capabilities of the device, used to help filter and identify devices that server a certain purpose (e.g. controller, or headset, or hardware tracker).
Declaration
public InputDeviceCharacteristics characteristics
Field Value
Type | Description |
---|---|
InputDeviceCharacteristics |
deviceId
The underlying deviceId, this can be used with InputDevices to create a device.
Declaration
public int deviceId
Field Value
Type | Description |
---|---|
int |
deviceName
The name of the device.
Declaration
public string deviceName
Field Value
Type | Description |
---|---|
string |
inputFeatures
A list of all input features. XRFeatureDescriptor
Declaration
public List<XRFeatureDescriptor> inputFeatures
Field Value
Type | Description |
---|---|
List<XRFeatureDescriptor> |
manufacturer
The manufacturer of the device.
Declaration
public string manufacturer
Field Value
Type | Description |
---|---|
string |
serialNumber
The serial number of the device. An empty string if no serial number is available.
Declaration
public string serialNumber
Field Value
Type | Description |
---|---|
string |
Methods
FromJson(string)
Converts a json string to a new XRDeviceDescriptor.
Declaration
public static XRDeviceDescriptor FromJson(string json)
Parameters
Type | Name | Description |
---|---|---|
string | json | The JSON string containing XRDeviceDescriptor data. |
Returns
Type | Description |
---|---|
XRDeviceDescriptor | A new XRDeviceDescriptor |
ToJson()
Converts this structure to a JSON string.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
string |