WebGl project memory usage
Hi everyone!
I am making an educational game that is mostly UI based, and here is my issue:
When checking in the profiler the amount of memory allocated it goes up to .57Gb, which seems strange to me. So here are some details about my project that maybe help clear out the possible cause for those more experienced than me.
My canvases are set to match the resolution of 1920x1080.
The profiler says my textures are 67mb in size
When opening it in firefox, I get about 280mb of memory usage
Here is the output of Editor.log after compiling:
Textures 14.4 mb 59.2% Meshes 0.0 kb 0.0% Animations 96.7 kb 0.4% Sounds 89.4 kb 0.4% Shaders 2.6 kb 0.0% Other Assets 4.7 mb 19.1% Levels 447.2 kb 1.8% Scripts 717.6 kb 2.9% Included DLLs 3.9 mb 16.1% File headers 32.6 kb 0.1% Complete size 24.4 mb 100.0%
The thing that I don't fully understand is why such a high amount of memory is used when playing it, since the build is obviously small.
Is this kind of amount of memory normal?
Thanks to everyone.
Answer by Schubkraft · Dec 20, 2016 at 03:09 PM
There is way more going with the browser memory than is obvious from your normal sources.
For a detailed look on what is contributing to memory consumption of your WebGL game look at https://blogs.unity3d.com/2016/09/20/understanding-memory-in-unity-webgl/ and https://blogs.unity3d.com/2016/12/05/unity-webgl-memory-the-unity-heap/
Thanks man, I will keep optimizing my code and the allocations of memory in my game and see if that helps. Thanks for the links!
Your answer
Follow this Question
Related Questions
Run out of memory in build 1 Answer
Why does my RAM usage keep increasing? 1 Answer
Profiler Stops Updating on Change Level 0 Answers
Memory error pls help 0 Answers
What is the correct way to store circular references in Unity? 1 Answer