---
title: "Unity WebGL Memory Budgets for Fish-Net Browser IO Fat Games"
description: "Unity WebGL memory budgets for Fish-Net browser IO: stop mid-match tab crashes by capping heap growth, tick garbage, and fat-character skin copies on mobile."
url: "https://news.bigfatgames.com/unity-webgl-memory-budgets-fish-net-browser-io-fat-games"
category: "Performance"
date_published: 2026-09-28
reading_time_minutes: 11
word_count: 2699
---

# Unity WebGL Memory Budgets for Fish-Net Browser IO Fat Games

*A session heap ledger for live IO matches: growth policy, tick garbage, and skins that stay in RAM.*

![Unity WebGL Memory Budgets for Fish-Net Browser IO Fat Games](https://pub-07fb5e4955ba485b822d6b388be96d9a.r2.dev/627e11da-a23a-494d-9964-843e8f31c507/unity-webgl-memory-budgets-fish-net-browser-io-fat-games/hero-ae9e5dc6-36fd-45f4-944e-780d9d51bfcc.jpg)

**TL;DR:**

- The Unity Web heap is one contiguous WASM block, and a failed growth step can crash the tab even while you are still under the cap.
- Unity 6 defaults to a 32 MB initial heap and a recommended 2048 MB maximum; geometric growth steps by 0.2 of the current size, capped at 96 MB.
- On mobile browsers, set Initial Memory Size to typical match use instead of relying on desktop-style heap growth.
- The Web garbage collector runs only at the end of the frame, so Fish-Net tick code must not allocate.
- Addressable skins stay in the Unity heap; cutting VRAM does not free that CPU copy, and mip streaming does not work on WebGL.

## Three Heap Bills, One WASM Block

## Fix the Phone Heap, Step the Desktop Heap

## What a Tick May Touch Before End-of-Frame GC

## Fat-Character Skins That Stay in the CPU Heap

## URP Targets Are a Fixed Tax on the Same WASM Heap

## Read the Crowd, Then Unload the Wave

## Conclusion

- One WASM block — A Fish-Net browser match dies when automatic heap growth cannot finish a new contiguous allocation, even under the configured cap, and download size does not predict that crash.
- Three shared bills — Growth headroom, per-tick managed churn, and resident CPU copies (addressables, URP targets, audio) all sit on the same heap; VRAM cuts and mip streaming do not free the CPU copy.
- Phone vs desktop growth — Set Initial Memory Size to measured typical use on mobile; on desktop use Geometric growth (0.2 of the current heap, 96 MB step cap) and treat 2048 MB as the ship ceiling because builds past that hit known Firefox and pre-119 Chrome bugs.
- Tick before GC — Web GC runs only at end of frame, so replicate and reconcile must stay allocation-free with structs, no per-tick string keys, and pooled fat-character or blob spawns.
- Unload the fat skin — Addressables land directly in the WASM heap; ship lower-resolution groups and unload the high-res group when a player leaves relevance instead of waiting for a scene change.
- Strip the fixed tax first — Unused URP Depth and Opaque textures, extra-light shadows, extra cameras, and MSAA copies are resident, not garbage; a heap that still climbs after a zero-allocation tick and unload paths is a leak, not a reason to push toward 4 GB.

Profile a crowded Fish-Net WebGL match, lock phone initial size and desktop geometric growth under 2048 MB, then unload every fat skin that leaves relevance before you raise Maximum Memory Size.

## Frequently Asked Questions

### Why does a Unity WebGL tab crash when the profiler still shows free memory?

The Web heap is one contiguous WASM allocation. Unity documents that automatic growth can crash the page if the browser cannot allocate a new contiguous block, even when you are still under Maximum Memory Size.

### What Maximum Memory Size should a Fish-Net browser game use?

Unity recommends 2048 MB and says that is enough for most applications. Up to 4096 MB is allowed on Unity 6, but builds over 2048 MB have known bugs in Firefox and in Chrome before version 119. Older Unity versions were capped at 2 GB.

### Should a mobile WebGL build rely on heap growth?

No. Unity says mobile browsers need the advanced tuning options, and Initial Memory Size should be set to typical heap usage rather than left to grow the way a desktop tab often can.

### When does the garbage collector run in a Unity Web build?

Only when no managed code is executing, at the end of each frame. Per-tick allocations in a Fish-Net replicate or reconcile loop can raise the heap before that collection runs.

### Do Addressables live outside the Unity heap on WebGL?

No. AssetBundles are downloaded directly into the Unity heap. Cutting VRAM does not free that CPU copy: one capture still used 800 MB of RAM after VRAM was reduced to 200 MB. Mipmap streaming also does not work on Unity WebGL or WebGPU.

### Does Fish-Net allocate on the networking hot path?

Fish-Net documents zero hotpath allocations and contrasts that with regular garbage from Mirror and Netcode. Your own tick data, spawns, and loaded skins can still allocate, so those stay the budget you have to police.

## Sources

- [https://docs.unity.com/en-us/engine/6000.0/manual/platform-specific/webgl/develop/memory](https://docs.unity.com/en-us/engine/6000.0/manual/platform-specific/webgl/develop/memory)
- [https://docs.crazygames.com/resources/optimization-tips/](https://docs.crazygames.com/resources/optimization-tips/)
- [https://docs.unity3d.com/6000.5/Documentation/Manual/class-PlayerSettingsWebGL.html](https://docs.unity3d.com/6000.5/Documentation/Manual/class-PlayerSettingsWebGL.html)
- [https://docs.unity3d.com/6000.3/Documentation/Manual/web-optimization-player.html](https://docs.unity3d.com/6000.3/Documentation/Manual/web-optimization-player.html)
- [https://discussions.unity.com/t/webgl-memory-increment-issue-and-crash-on-ios/894771](https://discussions.unity.com/t/webgl-memory-increment-issue-and-crash-on-ios/894771)
- [https://fish-networking.gitbook.io/docs/overview/readme/features](https://fish-networking.gitbook.io/docs/overview/readme/features)
- [https://www.linkedin.com/pulse/optimizing-vram-unity-webgpu-webgl-%C5%BEarko-petrovi%C4%87-n1eye](https://www.linkedin.com/pulse/optimizing-vram-unity-webgpu-webgl-%C5%BEarko-petrovi%C4%87-n1eye)
- [https://docs.unity3d.com/6000.6/Documentation/Manual/urp/configure-for-better-performance.html](https://docs.unity3d.com/6000.6/Documentation/Manual/urp/configure-for-better-performance.html)
