What is a safe maximum memory size for WebGL builds?

editor interface

The docs say:

If this value is too low, you will get out of memory errors when your loaded content and scenes would not fit into the available memory. But if you set this value too high, your content might fail to load in some browsers or on some machines, because the browser might not have enough available memory to allocate the requested heap size.

With the default value of 256 my game encountered an exception. When raised to 512 it runs fine.

What is a safe memory size for WebGL builds that is unlikely to cause my content to “fail to load in some browsers or on some machines”?

There is no straight answer for that. The main issue is that he browser needs to allocate that memory as one continuos block. The bigger the block has to be, the more fragmented the available memory is, the less memory the user’s computer has the more likely it is to fail.

So it is a bit of a guessing game and also depending on the memory you actually really need to run your game at all.