Show / Hide Table of Contents

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.

Inheritance
System.Object
SavegameManager
JsonSavegameManager
Inherited Members
SavegameManager.TIME_FORMAT
SavegameManager.Saving
SavegameManager.Saved
SavegameManager.SaveFailed
SavegameManager.Loading
SavegameManager.Loaded
SavegameManager.LoadFailed
SavegameManager.Ready
SavegameManager.key
SavegameManager.encrypt
SavegameManager.compress
SavegameManager.iterationsOfPBKDF2
SavegameManager.collectGarbageOnSave
SavegameManager.collectGarbageOnLoad
SavegameManager.savegamesDirectoryName
SavegameManager.savegameFileExtension
SavegameManager.savingTimeoutSeconds
SavegameManager.loadingTimeoutSeconds
SavegameManager.batchSize
SavegameManager.LoadNewestSavegame()
SavegameManager.savegamesDirectoryPath
SavegameManager.OnSave()
SavegameManager.OnLoad()
SavegameManager.OnSaving()
SavegameManager.OnLoading()
SavegameManager.OnSaveFailed()
SavegameManager.OnLoadFailed()
SavegameManager.OnReady()
SavegameManager.CheckSavegamesDirectory()
SavegameManager.GetNewestSavegame()
Namespace: GlitchedPolygons.SavegameFramework.Json
Assembly: UnityScriptsLibrary.dll
Syntax
public sealed class JsonSavegameManager : SavegameManager

Methods

| Improve this Doc View Source

GatherSaveableComponentsInScene()

Gathers all the JsonSaveableComponents in the scene and registers them to the GlitchedPolygons.SavegameFramework.Json.JsonSavegameManager.saveableComponents array.

Declaration
public void GatherSaveableComponentsInScene()
| Improve this Doc View Source

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
SavegameManager.Load(String)
See Also
XmlSavegameManager
JsonSavegameManager
| Improve this Doc View Source

Save(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!)

Overrides
SavegameManager.Save(String)

See Also

SavegameManager
  • Improve this Doc
  • View Source
Back to top Generated by DocFX