InputDevice

struct in UnityEngine.XR

切换到手册

描述

定义 XR 输入子系统中的输入设备。

To retrieve input features or route haptic feedback to XR input devices, specify an XRNode as the destination. Use XRNode.LeftHand and XRNode.RightHand to send haptic data to left or right devices. You can send haptic data either as an impulse or as a buffer of raw bytes that is played back through the haptic device. You can stop haptic output or query the device for it's buffered capabilities at any time.

公共函数

SendHapticBuffer向设备发送原始触觉数据缓冲区。
SendHapticImpulse向设备发送触觉脉冲。
StopHaptics停止设备的所有触觉播放。
TryGetHapticCapabilities获取设备的触觉功能。