【问题标题】:How can I check if an iOS device has the vibration in Unity?如何在 Unity 中检查 iOS 设备是否有振动?
【发布时间】:2021-02-16 17:10:07
【问题描述】:

我一直在寻找答案,但在任何地方都找不到。

我基本上是在寻找一种通过代码检测 iOS 设备是否在 Unity Engine 中具有振动硬件的方法。 我知道我可以通过DeviceGeneration 属性检查设备类型并排除平板电脑或某些 iPod,但我正在寻找一种更通用和更合乎逻辑的方法来解决这个问题。

有什么线索吗?

【问题讨论】:

    标签: ios unity3d hardware vibration


    【解决方案1】:

    UnityEngine 命名空间包含SystemInfo.supportsVibration。如果正在运行的设备支持振动,则此属性返回 true。

    【讨论】:

      猜你喜欢
      • 2011-09-08
      • 1970-01-01
      • 1970-01-01
      • 2021-05-28
      • 1970-01-01
      • 2011-10-11
      • 1970-01-01
      • 1970-01-01
      • 2012-10-19
      相关资源
      最近更新 更多