Struct HID.HIDDeviceDescriptorBuilder
Helper to quickly build descriptors for arbitrary HIDs.
Namespace: UnityEngine.InputSystem.HID
Syntax
public struct HIDDeviceDescriptorBuilder
Constructors
HIDDeviceDescriptorBuilder(HID.GenericDesktop)
Declaration
public HIDDeviceDescriptorBuilder(HID.GenericDesktop usage)
Parameters
Type | Name | Description |
---|---|---|
HID.GenericDesktop | usage |
HIDDeviceDescriptorBuilder(HID.UsagePage, Int32)
Declaration
public HIDDeviceDescriptorBuilder(HID.UsagePage usagePage, int usage)
Parameters
Type | Name | Description |
---|---|---|
HID.UsagePage | usagePage | |
Int32 | usage |
Fields
usage
Declaration
public int usage
Field Value
Type | Description |
---|---|
Int32 |
usagePage
Declaration
public HID.UsagePage usagePage
Field Value
Type | Description |
---|---|
HID.UsagePage |
Methods
AddElement(HID.GenericDesktop, Int32)
Declaration
public HID.HIDDeviceDescriptorBuilder AddElement(HID.GenericDesktop usage, int sizeInBits)
Parameters
Type | Name | Description |
---|---|---|
HID.GenericDesktop | usage | |
Int32 | sizeInBits |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptorBuilder |
AddElement(HID.UsagePage, Int32, Int32)
Declaration
public HID.HIDDeviceDescriptorBuilder AddElement(HID.UsagePage usagePage, int usage, int sizeInBits)
Parameters
Type | Name | Description |
---|---|---|
HID.UsagePage | usagePage | |
Int32 | usage | |
Int32 | sizeInBits |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptorBuilder |
Finish()
Declaration
public HID.HIDDeviceDescriptor Finish()
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptor |
StartReport(HID.HIDReportType, Int32)
Declaration
public HID.HIDDeviceDescriptorBuilder StartReport(HID.HIDReportType reportType, int reportId = 1)
Parameters
Type | Name | Description |
---|---|---|
HID.HIDReportType | reportType | |
Int32 | reportId |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptorBuilder |
WithLogicalMinMax(Int32, Int32)
Declaration
public HID.HIDDeviceDescriptorBuilder WithLogicalMinMax(int min, int max)
Parameters
Type | Name | Description |
---|---|---|
Int32 | min | |
Int32 | max |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptorBuilder |
WithPhysicalMinMax(Int32, Int32)
Declaration
public HID.HIDDeviceDescriptorBuilder WithPhysicalMinMax(int min, int max)
Parameters
Type | Name | Description |
---|---|---|
Int32 | min | |
Int32 | max |
Returns
Type | Description |
---|---|
HID.HIDDeviceDescriptorBuilder |