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. ...
Unity 6 Mobile WebGL: Dealing with Input Quirks
It’s weird, I know, but it does work! I won’t got into crazy detail about why targeting WebGL on mobile devices is a thing we’re doing. We have our reasons, but there are some weird quirks that don’t seem well documented anywhere, so I thought I’d share what we’ve learned so far. I’ve also been looking for an excuse to start a blog, so here we are! Input - Controller & Keyboard The problem Keeping in mind that this is targeting mobile, touch is obviously going to be the main input, however I wanted to allow design to implement alternate input methods, mostly for accessibility reasons. ...