- Home /
WebGL memory size in Player Settings?
What does the 'WebGL Memory Size' player setting actually do?
I get this error no matter what I set it to:
"Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 16777216, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs."
But, if I open the generated .js file and increase TOTAL_MEMORY manually, it loads without error. I also noticed that you can just set TOTAL_MEMORY in Module object of the generated html page.
How exactly do you increase TOTAL_$$anonymous$$E$$anonymous$$ORY?
Linck, do what he says. Use a text editor to open the .js file it generates (your projectname.js for example, and look for TOTAL_$$anonymous$$E$$anonymous$$ORY. Of course THIS should also be exposed in the Unity editor (and scripting API)
There is a TOTAL_$$anonymous$$E$$anonymous$$ORY var in the generated index.html. The same setting is available in the player settings in the editor. The one in the html overrides the one from the player settings though.
Oh, I was trying to edit a var called TOTAL_$$anonymous$$E$$anonymous$$ORY in the .js that has the name of the project in the Developement folder. Didn't notice there was something in the index.html. I'll try it out.
Answer by Schubkraft · Jul 13, 2015 at 02:58 PM
What version are you using? Where are you getting the error?
Changing the memory in the HTML file is supported by us to allow you iterate faster over needed memory sizes for your content.
I'm getting the same issue. Changing the memory size doesn't seem to help either.
Same here. How do I set ALLOW_$$anonymous$$E$$anonymous$$ORY_GROWTH? Can I add that to the $$anonymous$$odule, e.g.: var $$anonymous$$odule = { ALLOW_$$anonymous$$E$$anonymous$$ORY_GROWH: 1, ..
???