10x
smaller build size
2x
less RAM usage
50 FPS
on mobile browsers
Does Unity WebGL work on mobile?
Out of the box, Unity's WebGL template is desktop-first: builds are large, memory footprints are high, and mobile browsers — especially iOS Safari with its tight per-tab memory budget — frequently crash before the title screen appears. The platform itself is capable, but a default Unity WebGL export will not run reliably on mid-range phones.
The good news: a properly optimized Unity WebGL build does run smoothly on mobile. Our production ports load in seconds on 4G, hold a stable 50 FPS on three-year-old Android devices, and pass the strict size and memory budgets that web gaming platforms (Poki, CrazyGames, GameDistribution, MSN, YouTube Playables) require.
1. Cutting Unity WebGL build size by 10x
Build size is the single biggest barrier on mobile. A 290 MB download is a non-starter — players bounce before the game boots. For our port of Tank Stars we brought a 290 MB original build down to 18 MB shipped over the wire. The same techniques apply to every Unity WebGL project:
- Strip the engine. Use IL2CPP with managed code stripping set to High, and remove unused modules (Physics 2D, XR, Terrain, Animation when unused).
- Recompress textures. Convert atlases to ASTC / DXT / Crunch with aggressive quality targets, and downscale anything that ships above the device's native resolution.
- Reauthor audio. Re-encode music as 96 kbps Vorbis mono, sound effects as ADPCM, and drop silent tails.
- Split the build with Addressables. Boot the game with a minimal core bundle, then stream levels on demand.
- Brotli at the edge. Serve `.br` builds with the correct `Content-Encoding` so the browser never decompresses on the CPU.
2. Halving Unity WebGL RAM usage
Mobile Safari kills tabs that exceed roughly 350 MB of resident memory. The default Unity heap of 256 MB combined with texture and audio overhead pushes most projects past that limit. Bring it down with:
- Right-size the heap. Set the initial WebGL memory size to 64–128 MB and disable heap growth where possible. Profile real allocations with the Memory Profiler before locking a value.
- Unload aggressively. Call `Resources.UnloadUnusedAssets()` and `System.GC.Collect()` between scenes; release Addressable handles the moment they leave the screen.
- Avoid render-texture bloat. Lower MSAA, drop unused post-processing effects, and reuse a single shared RenderTexture pool instead of allocating per frame.
- Compress runtime data. Replace JSON game data with ScriptableObjects baked at build time.
3. Hitting a stable 50 FPS in mobile browsers
Mobile GPUs throttle quickly under sustained load, so the goal is not a peak frame rate but a flat one. We target a locked 50 FPS because it leaves thermal headroom and matches the refresh behaviour of most low-end Android browsers.
- Lock the frame rate. Set `Application.targetFrameRate = 50` and call `QualitySettings.vSyncCount = 0` to stop the browser from double-rendering.
- Reduce draw calls. Use SRP Batcher or static batching, share materials, and bake lighting whenever the scene allows it.
- Simplify shaders. Replace Standard / URP Lit with mobile-friendly Unlit variants on background geometry; the browser's WebGL2 pipeline is fragment-bound on phones.
- Throttle physics. Lower `Time.fixedDeltaTime` to 0.02 s and disable physics on off-screen objects via culling groups.
- Detect the device. At boot, query `navigator.userAgent` and downgrade resolution scale, shadow quality and particle counts on low-end devices.
Shipping it: distribution matters too
An optimized build still needs a host that respects mobile constraints — HTTPS, Brotli, short TTFB and a sponsor SDK that does not block the main thread. We distribute through Poki, CrazyGames, GameDistribution, MSN Games, YouTube Playables and dozens of others via our partner StoreRider, so the engineering work above translates directly into mobile reach.
Want your Unity game running on mobile browsers?
We will deliver a playable WebGL prototype of your Unity build in 24 hours, then optimize it down to a mobile-grade production version.
Get a free assessment