FMOD keeps playing in Unity after code change during play mode

久未见 提交于 2021-02-11 16:55:44

问题


Here are the different options for how Unity will handle "Script Changes While Playing" and the corresponding effect it has on FMOD:

  • Recompile and Continue Playing - Hard Crash (see core dump below)
  • Stop Playing and Recompile - Hard Crash (see core dump below)
  • Recompile After Finish Playing - FMOD continues playing audio even after playmode exits (But after repeated plays, it does hard crash too)

Core Dump (excerpt) Here - FMOD Crashed Thread:

Thread 179 Crashed: 0 libsystem_kernel.dylib
0x00007fff692c233a __pthread_kill + 10 1 libsystem_pthread.dylib
0x00007fff6937ee60 pthread_kill + 430 2 libsystem_c.dylib
0x00007fff69249808 abort + 120 3 com.unity3d.UnityEditor5.x
0x0000000105a73bce HandleSignal(int, __siginfo*, void*) + 62 4
libmonobdwgc-2.0.dylib 0x00000001458ba9bd mono_chain_signal + 79 5 libsystem_platform.dylib 0x00007fff693735fd _sigtramp + 29 6 ??? 000000000000000000 0 + 0 7
com.fmod.fmodstudioL 0x0000000160832cd6 0x1605fe000 + 2313430 8 com.fmod.fmodstudioL 0x00000001607eb1df 0x1605fe000 + 2019807 9 com.fmod.fmodstudioL
0x00000001607ea9be 0x1605fe000 + 2017726 10 com.fmod.fmodstudioL
0x000000016081c5a4 0x1605fe000 + 2221476 11 com.fmod.fmodstudioL
0x00000001607f6390 0x1605fe000 + 2065296 12 libsystem_pthread.dylib 0x00007fff6937f109 _pthread_start + 148 13 libsystem_pthread.dylib
0x00007fff6937ab8b thread_start + 15

Is this a problem in FMOD? I'm using 2.01.07 (Unity 2019.4.18f1 - running on MacOS Catalina).

For anyone else with this problem, my current workaround is to disable compilation during play mode and reenable it after exiting playmode. Example here.

来源:https://stackoverflow.com/questions/65659831/fmod-keeps-playing-in-unity-after-code-change-during-play-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!