Skip to content

SaveMenu_ClassAPI

CG-Tespy edited this page Jul 30, 2019 · 1 revision

Main manager of the save system's UI, meant to be the main interface between said UI and objects outside the system.

Inherits from: MonoBehaviour
Namespace: CGTUnity.Fungus.SaveSystem

Table of Contents

Inspector Fields

If not filled in, the instance will try filling them in itself on Awake.

protected GameLoader gameLoader
protected GameSaver gameSaver
protected SaveSlotManager slotManager
protected SaveManager saveManager

Public Methods

Saving

virtual void SaveToSlot(int slotNumber)

  • Creates new GameSaveData with the passed slotNumber, and gets it written to disk, getting it assigned to the appropriate slot.
virtual void SaveToSlot(SaveSlot slot)

virtual void SaveToSlot(GameSaveData saveData)

virtual void SaveToSelectedSlot()


Loading

virtual void LoadFromSlot(int slotNumber)

  • Loads GameSaveData assigned to the slot with the passed number.
virtual void LoadFromSlot(SaveSlot slot)

virtual void LoadFromSlot(GameSaveData saveData)

virtual void LoadFromSelectedSlot()


Erasing

virtual void ClearSlot(int slotNumber)

  • Erases the save data from the slot with the passed number, and from disk.
virtual void ClearSlot(SaveSlot slot)

virtual void ClearSlot(GameSaveData saveData)

virtual void ClearSelectedSlot()


Save-retrieval

virtual GameSaveData GetSaveFromSlot(int slotNumber)

  • Checks the slot with the passed number and returns what GameSaveData it has.

Menu Display

virtual void Open()

virtual void Close()


Clone this wiki locally