---
url: /api/kiln/interfaces/SaveOptions.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / SaveOptions

# Interface: SaveOptions

## Properties

| Property | Type | Description |
| ------ | ------ | ------ |
|  `resources?` | [`Resource`](Resource.md)<`any`>\[] | Resources written to save slots (game progress: level, score, inventory). |
|  `traits?` | (`Trait` | `Relation`<`any`>)\[] | Entities to save: every entity with at least one of these traits, with these traits' values. Loading replaces those entities. Non-JSON traits (MeshRef) can't be saved: rebuild visuals on `Loaded`, or with a system over `[IsCoin, Not(MeshRef)]`. Relations listed here are relinked between saved entities. |
|  `persist?` | [`Resource`](Resource.md)<`any`>\[] | Resources kept across sessions automatically (settings, high scores): loaded at startup, saved when they change. |
|  `key?` | `string` | Storage key prefix, so games on one origin don't collide. Default 'kiln'. |
|  `storage?` | [`SaveStorage`](SaveStorage.md) | Default: localStorage in the browser, memory elsewhere. |
