Class XRDeviceDescriptor | Input System | 1.0.2
docs.unity.cn
    Show / Hide Table of Contents

    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.

    Inheritance
    Object
    XRDeviceDescriptor
    Namespace: UnityEngine.InputSystem.XR
    Syntax
    [Serializable]
    public class XRDeviceDescriptor

    Fields

    deviceId

    The underlying deviceId, this can be used with InputDevices to create a device.

    Declaration
    public int deviceId
    Field Value
    Type Description
    Int32

    deviceName

    The name of the device.

    Declaration
    public string deviceName
    Field Value
    Type Description
    String

    deviceRole

    The role 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 InputDeviceRole deviceRole
    Field Value
    Type Description
    InputDeviceRole

    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
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 22 January 2021