FMOD hangs in unity periodically

fmod.com uploads are fixed, thanks for bringing that to our attention. We have your repro and will get back to you shortly.

I’ve successfully reproduced the issue in both your reproduction project and a blank project. This issue appears to be a bug in the Unity Editor specific to macOS machines:

When the Unity Editor loses and regains focus while play mode is paused, OnApplicationPause is called with a value of true for the pauseStatus parameter. Future calls to OnApplicationPause will maintain this true value for pauseStatus, persisting across exiting and re-entering play mode (and including the call made to OnApplicationPause when a GameObject is created). When the Unity Editor next loses focus, OnApplicationPause is called with a false value, and returns to normal behaviour until the above is repeated.

The FMOD RuntimeManager instance pauses all events when it receives OnApplicationPause(true), and resumes event playback when it receives OnApplicationPause(false). In combination with the issue above, this means that the Editor losing and regaining focus while play mode is paused stops all audio playback until focus is lost again.

I’ve submitted a bug report to Unity regarding this issue. In the meantime, a potential workaround is to wrap RuntimeManager.OnApplicationPause in an #if !UNITY_EDITOR_OSX directive. Note that if you have “Run In Background” disabled in your project settings, doing this will cause the audio to continue playing when the Editor loses focus (while the game scene is otherwise paused).

Thanks for digging into this. My biggest fear was that this is something that could appear in the real builds of the game, but it doesn’t sound like that’s the case so I’m 100% satisfied. Thanks so much for making sure it wasn’t something less innocuous!

Just following up, Unity has added this bug to their issue tracker, so you’ll be able to monitor the progress of it there.

Thanks much!