Large saves
What happens when a save is legitimately big — whole-document writes, the ceilings that apply, and the practical options.
The honest starting point#
Very large single documents (tens of megabytes) are written whole. There is no streaming or incremental save path, and the framework does not pretend otherwise: a save is a document, and a document is materialised to be verified, compressed and encrypted as one unit. See Limitations.
The ceilings that apply#
| Setting | Framework default | Settings asset default | Meaning |
|---|---|---|---|
Limits.MaxSaveSizeBytes | 256 MB | 32 MB | Largest save the framework will read or write |
Limits.MaxMetadataSizeBytes | 64 KB | — | Ceiling for the metadata block, read on every listing |
Limits.MaxDecompressionRatio | 512 | 64× | Expansion bound, checked before and during decompression |
Set these to something your game can actually produce. A ceiling nothing can fit under protects nothing, and the validation report flags both a ceiling that is too low and one that is too high to mean anything.
If your save really is large#
- Split by slot. Slots are directories; a game with a large world can save regions or chapters into separate slots and load the one it needs. That is the intended answer and it uses no new machinery.
- Save the state, not the content. Content belongs in the build; a save should hold what a player changed. Most "huge saves" are a capture that included authored data.
- Turn on compression — Deflate before encryption, and measure. On the reference model it reduced 91 KB to 6.1 KB and made the whole save faster.
- Offload the write with
Storage.OffloadWritesToThreadPoolif the projection is not the bottleneck but the write is. - Raise the ceiling deliberately and record why, so the next person knows it was a decision.
Next#
- Performance — the measured costs, and how to reproduce them.
- Configuration reference — every limit with its meaning.
- Limitations — what the framework does not offer, stated up front.
Something wrong on this page? Every page here describes behaviour that is checked in the repository. If a page and the package disagree, the package wins.
Report a documentation problem · Frequently asked questions · Troubleshooting