AmbienceLayer there is a curious Compatibility Mode settings. This settings exists solely because Unity's track record of bugging out audio features related to Timeline.
Previously there was a bug that cause any audio played on Timeline to always miss its first few bits of audio, which I submitted myself 2 years ago and keep pinging them each new version until they finally fixed it 3 years later.
But the pain never ends. Currently there is this FMOD error spam bug that completely renders Timeline/Playables audio useless on WebGL build. (It just spams error, but sound-wise it is completely correct.)
Or how about this fresh new bug I just found and submitted that cause loop-checked clip in Timeline that doesn't even actually loop to emit a bit of glitched audio?
Or some bugs that said it is fixed in 2021.2.X but when I tried it out, it produces myraid of other bugs?
For detailed reproduction steps, please see WebGL Audio Problems page.
Criterias that turn on Compatibility Mode
This compatibility "mode" is turned on automatically from settings on
#define built into the code named
WEBGL_FMOD_SPAM_FIXED, which if defined, will turn the mode off.
Currently the mode is always on, (i.e. nothing defines
WEBGL_FMOD_SPAM_FIXED) as Issue ID 1270635 didn't get fixed in the latest release (2021.2.4f1) unlike promised in that page. When it is finally fixed for good, I will add conditional define breakpoint after that version to turn off the mode.
This is why it says WebGL is not supported in the front page. But if you really want to use Tiny Ambience partially, Compatibility Mode is here to avoid the bugs on WebGL build. It maybe useful if your game is multi-platform and one of them is WebGL, and it is a pain to strip out Tiny Ambience for just that platform.
How it works
AmbienceLayer has 3 modes : Looping Clip, One Shot Program, and Timeline. The settings for all modes are bundled up inside the same asset. Normally these settings are mutually exclusive, settings for one mode is useless on others. Retaining settings for all modes was only useful for when you are still switching around and trying out various modes, switching back should retain the values you have designed.
Now we can specify a fallback from Timeline mode to use either Looping Clip or One Shot Program instead. You simply have multiple settings for Timeline and your fallback mode at the same time in 1
Available bug resolutions
- Silence : Skip playing this Timeline layer completely. Other
AmbienceLayerin the same
Ambiencethat are not Timeline still plays.
Ambienceas a whole may sounds incomplete, but at least you will not get the FMOD error spam. If you have been making
Ambiencewith the main thing on Looping Clip layer and add fluffs on Timeline layer, Silence Compatibility Mode can sounds pretty good still!
- Looping Clip : Play as if this layer is on Looping Clip mode. An editor like Looping Clip is appended below.
- One Shot Program : Play as if this layer is on One Shot Program mode. An editor like One Shot Program is appended below.
- Play Anyway : Go against my warning and play using Timeline like intended. This will likely cause the bugs, but could be useful if Unity had fixed the bug, but I wasn't around to update compatibility mode criterias fast enough for your needs.
Here's an example when fallback mode is selected. A similar editor but the header is suffixed with "(Compatibility)". Note that these fields are serialized using the same property path as an actual mode, if you decided to switch from Timeline to the mode that was your fallback, you will see these fields transferred over.