Struct GetHapticCapabilitiesCommand
Input device command struct for retrieving the haptic capabilities of a device.
Implements
Namespace: UnityEngine.InputSystem.XR.Haptics
Assembly: Unity.InputSystem.dll
Syntax
public struct GetHapticCapabilitiesCommand : IInputDeviceCommandInfo
Fields
frequencyHz
The buffer frequency the device operates at in Hertz. This impacts how fast the device consumes buffered haptic data.
Declaration
public uint frequencyHz
Field Value
Type | Description |
---|---|
uint |
Remarks
This value is greater than 0 if supportsBuffer is true, and 0 otherwise.
maxBufferSize
The max amount of buffer data that can be stored by the device.
Declaration
public uint maxBufferSize
Field Value
Type | Description |
---|---|
uint |
numChannels
The number of haptic channels available on this device.
Declaration
public uint numChannels
Field Value
Type | Description |
---|---|
uint |
optimalBufferSize
The optimal size of a device's buffer, taking into account frequency and latency.
Declaration
public uint optimalBufferSize
Field Value
Type | Description |
---|---|
uint |
supportsBuffer
This device supports sending a haptic buffer.
Declaration
public bool supportsBuffer
Field Value
Type | Description |
---|---|
bool |
See Also
supportsImpulse
This device supports sending a haptic impulse.
Declaration
public bool supportsImpulse
Field Value
Type | Description |
---|---|
bool |
See Also
Properties
capabilities
The haptic capabilities of the device, populated after this command is executed.
Declaration
public HapticCapabilities capabilities { get; }
Property Value
Type | Description |
---|---|
HapticCapabilities |
typeStatic
The data format identifier of the device command as a FourCC code.
Declaration
public FourCC typeStatic { get; }
Property Value
Type | Description |
---|---|
FourCC |
Methods
Create()
Creates and returns a new initialized input device command struct for retrieving the haptic capabilities of a device when executed.
Declaration
public static GetHapticCapabilitiesCommand Create()
Returns
Type | Description |
---|---|
GetHapticCapabilitiesCommand | Returns a new command struct with the data header initialized, making it ready to execute. |