Browser: Happens in Chrome and Firefox, probably edge and safari but not tested yet.
When a new Unity scene loads in WebGL, Unity does some memory clean up. Most of my scenes load perfectly, pulled into the project using assetbundles.
The scene, avatars, seems to trigger a crash most of the time but I’ve seen the crash on other scenes as well.
Error code usually 160 but I’ve also had 163. I’ve tried verbose exceptions and nothing comes up. Makes me feel the error is internal to Unity after doing the memory clean up.
I do notice the scene shows a success load log
then several frames later shows the log for cleaning up the memory
After this log is alway were the crash happens.
loading scenes built into the project.
rebuilding the scene from a new scene.
adding more assets to the scene because most of these scenes are pretty light with controllers that load in additional assets after the scene loads.
re-written a bunch of code and inserted tons of logs to track this down. It always happens right after the memory clean up method no matter what is going on in between the scene load log and the Total: --ms log. I’ve also added a yield and waited for seconds after the scene loads to allow the memory to clear before continuing…
still can’t crack it.