Class HapticImpulseSingleChannelGroup
Haptic impulse channel group that wraps a single channel instance. This class provides a convenient way to create a channel group with a single channel known at time of construction.
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Inputs.Haptics
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
public class HapticImpulseSingleChannelGroup : IXRHapticImpulseChannelGroup
Constructors
HapticImpulseSingleChannelGroup(IXRHapticImpulseChannel)
Initializes and returns an instance of Haptic
Declaration
public HapticImpulseSingleChannelGroup(IXRHapticImpulseChannel channel)
Parameters
Type | Name | Description |
---|---|---|
IXRHaptic |
channel | The single haptic impulse channel the group contains. |
Properties
channelCount
The number of haptic channels on the device.
Declaration
public int channelCount { get; }
Property Value
Type | Description |
---|---|
int |
impulseChannel
The single haptic impulse channel the group contains.
Declaration
public IXRHapticImpulseChannel impulseChannel { get; }
Property Value
Type | Description |
---|---|
IXRHaptic |
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. |