FMOD Audio
Best practices when using FMOD on WebGL
FMOD supports WebGL, given the nature of WebGL, you'll need to note a few things:
Compatible version
FMOD requires plugin version 2.0 and Unity version 2019.1, we highly recommend using FMOD version 2.0 or above.
Banks load times
FMOD loads banks asynchronously and WebGL is single-threaded. If your game tries to access events or buses before the banks are loaded, you'll get an FMOD_ERR_EVENT_NOTFOUND
error. Waiting till the bank is loaded will resolve the issue. You can find a code sample here
FMOD Effects support
Not all effects are supported on WebGL; for example, not all DSP effects are supported. For a list of supported effects, you can check here.
Audio stuttering on playback
As mentioned before, WebGL is single-threaded and as such, you may encounter stuttering when testing audio. It is possible to fix this by increasing the buffer size. This may incur larger audio latency but will handle larger delays between audio mixing. You can read more about the buffer size here.
More information
You can read all about FMOD and WebGL best practices here
Updated 12 months ago