Class XRInputDeviceHapticImpulseChannelGroup
A haptic impulse channel group that uses an XR input subsystem device to query the haptic capabilities of a device.
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Inputs.Haptics
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public class XRInputDeviceHapticImpulseChannelGroup : IXRHapticImpulseChannelGroup
Properties
channelCount
The number of haptic channels on the device.
Declaration
public int channelCount { get; }
Property Value
Type | Description |
---|---|
int |
Methods
GetChannel(int)
Gets the haptic channel on the device by index.
Declaration
public IXRHapticImpulseChannel GetChannel(int channel = 0)
Parameters
Type | Name | Description |
---|---|---|
int | channel | The haptic channel index. |
Returns
Type | Description |
---|---|
IXRHaptic |
Returns the haptic channel, or null if the haptic channel does not exist. |
Initialize(InputDevice)
Initialize the channel group with the given device. Does nothing if already initialized with the same device.
Declaration
public void Initialize(InputDevice device)
Parameters
Type | Name | Description |
---|---|---|
Input |
device | The input device that haptic impulses should be sent to. |