Class SaveManager
- Namespace
- GrindFest
- Assembly
- GrindFest.dll
[DefaultExecutionOrder(-150)]
public class SaveManager : Singleton<SaveManager>
- Inheritance
-
objectSaveManager
- Inherited Members
Fields
- saveFile
Where the save file lives. Assigned at RUNTIME (see Awake) — it used to be filled only by GrindFest.SaveManager.OnValidate(), which runs in the editor alone, so every build carried the build machine's absolute path. On WebGL that is outside
Application.persistentDataPath, i.e. outside the only tree Unity syncs to IndexedDB: the save silently did not survive a reload, and the log still said "Game saved to …". Kept public so the inspector can show it.
Methods
- EnsureRestoreAssetsAsync(SaveData)
Residency barrier for the assets MakeParty(SaveData, Party) destroys the save without.
MakeParty and LoadItem are synchronous on purpose — no synchronous loading door exists anywhere in the content platform — so the way to guarantee an asset is there is to await it at a setup boundary like this one, before the synchronous restore runs. That is the same shape as every other boot prerequisite (world generation, item prefabs) and it is the only one that keeps a cold cache from quietly turning into a missing stash.