Skip to content

SaveWriter_ClassAPI

CG-Tespy edited this page May 4, 2020 · 2 revisions

Writes saves to disk to be later retrieved, usually when the game starts up.

Inherits from: SaveFileAccessor
Namespace: CGTUnity.Fungus.SaveSystem

Inspector Fields

protected bool writeEncrypted

  • For when you want to make it harder for players to cheat by editing the save data. Experimental.

Public Fields

UnityAction GameSaveWritten

  • Invoked when this particular SaveWriter writes GameSaveData. Params: saveData, filePath, fileName

Public Methods

virtual bool WriteOneToDisk(GameSaveData saveData, string saveDir)

  • Writes the passed save data to the passed save directory, returning true if successful, or false otherwise.
virtual bool WriteOneToDisk(GameSaveData saveData, string saveDir, out string outputDir)
  • Like WriteOneToDisk(GameSaveData, string), but (if successful) puts the save file's exact location into the passed outputDir.
virtual bool WriteAllToDisk(IList saveDatas, string saveDir)
  • Writes the passed list of save datas to the passed save directory, returning true if successful, or false otherwise.

Clone this wiki locally