Version: 2023.2

InputDevice.characteristics

切换到手册
public XR.InputDeviceCharacteristics characteristics ;

描述

只读。用于描述 InputDevice 特征的枚举标志的位掩码。

Use Characteristics to determine whether an InputDevice has specific features or capabilities. For example, if the set of InputDeviceCharacteristics includes both InputDeviceCharacteristics.HeldInHand and InputDeviceCharacteristics.Left, then the device provides tracking data for the left hand.

**Characteristics** 是位掩码。使用按位运算符可测试特定标志。例如,要确定 **InputDevice** 是否具有摄像机,可使用下面的条件语句:

(inputDevice.characteristics & InputDeviceFlags.Camera) == InputDeviceFlags.Camera