New to ScriptableObjects? See What is a ScriptableObject? first.
1

Make a data class

Create a script and inherit PersistentScriptableObject. Add the serialized fields you want to persist, exactly as on any ScriptableObject.

using PersistentAsset;
using UnityEngine;

[CreateAssetMenu(menuName = "Player Data")]
public class PlayerData : PersistentScriptableObject
{
    public int gold;
    public int level = 1;
}
Your defaults are the values the fields hold outside play mode: what the script initializes them to, plus anything set on the asset in the inspector. They are what a new player starts with, and what the data falls back to when there is no save.
2

Create the asset

In the Project window, right-click and choose Create > Player Data (the menu name set in [CreateAssetMenu]). This makes one PlayerData asset: the shared instance your game reads and writes at runtime.

Reference it like any ScriptableObject: a serialized field on a MonoBehaviour, a Resources.Load, or your own dependency setup.

3

Pick a manager

Select the asset. At the top of its inspector is a Persistence Manager dropdown, which sets where and how the data is saved. Choose Prototype.

Persistence Manager dropdown on a PersistentScriptableObject
The Persistence Manager dropdown: start with Prototype

Prototype needs no configuration and works on desktop, mobile and WebGL. Moving to another manager later (a real save file, Player Prefs, the cloud) is a change of dropdown, with no code to touch. See Local Saving for the full list.

4

Press Play

To see it work:

  1. Enter Play mode.
  2. Change gold at runtime, from your code, or by editing the asset in the inspector while playing.
  3. Exit Play mode. Persistent Asset saves automatically.
  4. Enter Play mode again, and gold is loaded back to the value you left it at.

There is no call to Save or Load anywhere: the manager loads on launch and saves when the game stops. Both can also be called manually (see Core Concepts).

Wiping your test data

To retest the first-launch experience, open Tools > Persistent Asset > Actions > Delete Local Data and pick the Prototype manager (or All). Prototype handles its own file, so there is no path to find.

What just happened?

Three pieces did the work:

  • Your data: the PlayerData object.
  • A manager: Prototype, picked in the dropdown. It saves and restores the object's fields.
  • The operations: a load when the game starts, a save when it stops, both automatic.
After play mode, the asset shows your authored defaults again. The save is untouched and loads on the next launch (see Core Concepts).
That is the basic workflow. Save slots, encryption, cloud saves and no-code variables are there when your game needs them.