Mobile 🤝 Unity WebGL: Tips
Memory is the worst Again, memory is the biggest constraint, so here are some tips to reduce it to target the lowest end devices: Initial memory size should be 32MBs - It will grow, but we found low end Android devices didn’t like anything larger than that initially. Fonts should be static (Import settings), when its dynamic we observed memory jump throughout gameplay. Keep the compression as low as you can manage and be careful of spacing in the atlas, as it impacts how much shadow/glow you can apply to the font materials. Stick to the forward renderer, even for 2D. We’re using URP, but the 2D renderer added so much to the memory usage and we weren’t making much use of its features. We have a few cool scripts that remove unnecessary packages and optimise all the project settings for WebGL. I’ll share it when we have it a little more polished up as its genuinely useful and an amalgamation of currently available open source scripts. ...