WebGL freezes until memory is allocated (20 seconds)
My game creates 10,000 entities or so during runtime that are all rendered on screen. In the WebGL build when they are created the game freezes for about 20 seconds, and then after this period it runs totally smoothly. I am guessing this is the automatic memory heap allocation catching up. I already include:
PlayerSettings.WebGL.linkerTarget = WebGLLinkerTarget.Wasm;
PlayerSettings.WebGL.threadsSupport = true;
PlayerSettings.WebGL.memorySize = 512;
How can I avoid this crashing period? Your help would be greatly appreciated. If you want to see this live just go to "www.superballs.graphics" (has to be Chrome browser), and click and hold on the game screen. You will notice that every once in a while as objects are created it crashes, and then after runs smoothly.
Note: GPU instancing is required.
Your answer
Follow this Question
Related Questions
Where to set Total_Memory? 0 Answers
Release memory in Addressable not working in webgl 0 Answers
WebGL game crashing after some time in firefox 0 Answers
WebGl project memory usage 1 Answer
Unity WebGL heap memory usage tracking 0 Answers