WebGL crash on instanitate
Hi, i'm having problem with a crash issue that seemingly comes from during instantiation, on WebGL platform.
I'm using Unity 2018.4.7f1, with just WebGL 1.0 for graphic API, and WebAssembly for linker target. Built as Development build.
The error I got from Chrome, is always "Memory access out of bounds"
Here's is my code snippet
UnityEngine.Debug.Log("ZR 1.8: " + (template != null));
var go = MonoBehaviour.Instantiate (template);
UnityEngine.Debug.Log("ZR 2: " + GetType());
Notice that it never went past to "ZR 2" log, and the crash comes after "ZR 1.8". "template" is a GameObject that's loaded from an AssetBundle, and it doesn't seems to be null.
So I start trying to remove the children objects in the "template" and rebuild the bundle. And I have reduce it into an empty game object. Its still crashed with the same error.
I have run out of idea on how to debug this issue. It would be helpful if anyone can spot my mistake, or direct me on how to solve this problem.
Thanks in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220612213601im_/https://answers.unity.com/themes/thub/images/avi.jpg)