1.6 KiB
1.6 KiB
#灵感
三个震动的对比:
性能消耗,也比较高,注意Json转换比较多
插件本身,强度调用报错要修复
java.lang.RuntimeException: Unable to set amplitude multiplication, no clip loaded.
java.lang.RuntimeException: Unable to set amplitude multiplication, no clip loaded.
at com.lofelt.haptics.LofeltHaptics.setAmplitudeMultiplication(Native Method)
at com.lofelt.haptics.LofeltHaptics.setAmplitudeMultiplication(LofeltHaptics.java:409)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
引入新的.net库 再试试这个方法
// 使用 System.Text.Json(.NET Core 3.0+)
overlayJsonClip = JsonSerializer.SerializeToUtf8Bytes(currentHapticConfig, options);
震动报错相关
震动 三消 项目组 外部调用: