1. Check your setup
- Open Tools → Complete Save → Setup Assistant.
- Create a default configuration asset.
- Run Validate configuration and test disposable file.
The default settings are ready for local saving. The test uses a temporary file and leaves your game save alone.
2. Try a first save
Create a script named FirstSave.cs, paste the example below, and attach it to a scene object. Bind a UI button to SaveCheckpoint, or call it from your checkpoint logic.
using CSS;
using UnityEngine;
public sealed class FirstSave : MonoBehaviour
{
public int coins;
private bool ready;
private async void Start()
{
SaveResult result = await SaveSystem.LoadAsync();
if (!result.Succeeded && result.Status != SaveStatus.Missing)
{
Debug.LogError(result.Message);
return;
}
coins = SaveSystem.Get("player.coins", 0);
ready = true;
}
public async void SaveCheckpoint()
{
if (!ready) return;
SaveSystem.Set("player.coins", coins);
SaveResult result = await SaveSystem.SaveAsync();
if (!result.Succeeded) Debug.LogError(result.Message);
}
}
Play the scene, change coins, and trigger the checkpoint. Stop and start Play again to check that the value returns.
3. What do these calls do?
| Call | What it does |
|---|---|
Set(key, value) | Updates a value in memory. You still need to save it. |
SaveAsync() | Writes your current data to storage. Await it to know when saving has finished. |
LoadAsync() | Reads your saved data so the game can use it. |
Get(key, fallback) | Gets a value from memory, or returns the default you supplied. |
It is normal to have no save on the first launch. Other loading errors need attention: keep the existing save and check the error message before replacing it.
4. Check what was saved
Open Tools → Complete Save → Save Browser to see your saved keys and values. A key is the name you give a value, such as player.coins.
Continue with saving and loading, or try automatic field sync to keep a variable connected to save memory.