Class JsonSavegameManager
The JsonSavegameManager is a component that should exist only exactly once in every scene.
It provides functionality for saving/loading the game's state.
The savegame's file format is JSON, which can be compressed and/or encrypted.
Check out the SavegameManager's base class documentation for more information.
Inherited Members
Namespace: GlitchedPolygons.SavegameFramework.Json
Assembly: UnityScriptsLibrary.dll
Syntax
public sealed class JsonSavegameManager : SavegameManager
Methods
| Improve this Doc View SourceGatherSaveableComponentsInScene()
Gathers all the JsonSaveableComponents in the scene and registers them to the GlitchedPolygons.SavegameFramework.Json.JsonSavegameManager.saveableComponents array.
Declaration
public void GatherSaveableComponentsInScene()
Load(String)
Loads a savegame file from inside the savegamesDirectoryPath.
The
fileName parameter is just the savegame's file name (local to the savegamesDirectoryPath and WITHOUT THE FILE EXTENSION).This will cause a chain reaction of method calls and procedures in order to make the loading procedure and map transition as smooth as possible.
Check out the documentation of the implementing child classes to find out more about how it works (e.g. XmlSavegameManager).
Declaration
public override void Load(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | The savegame's file name (WITHOUT ITS EXTENSION!). Path is local to the savegamesDirectoryPath. |
Overrides
See Also
| Improve this Doc View SourceSave(String)
Saves the game out to a time-stamped savegame file inside the savegamesDirectoryPath folder.
Declaration
public override void Save(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | fileName | The savegame's file name (WITHOUT EXTENSION!) |