Skip to content

GameSaveData_ClassAPI

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

Contains the state of an entire playthrough, containing all the relevant types of save data the game uses. This is what's meant to be loaded from a title screen or a save menu.

Inherits from: SaveData

Namespace: CGTUnity.Fungus.SaveSystem

Public Properties

virtual string Description

  • Readable: yes
  • Writable: yes
  • Optional field you may want to display in a save slot.
virtual int SlotNumber
  • Readable: yes
  • Writable: yes
  • Index of what slot this should be assigned to. You may want to assign it a negative value if you don't want it assigned to any Save Slots (like if you decide to use the system's API for a slotless save system).
virtual System.DateTime LastWritten
  • Readable: yes
  • Writable: yes
  • Contains the date this was last written to. By default is the date that this was first created.
virtual List Items
  • Readable: yes
  • Writable: yes
  • Most of the SaveData to load is encapsulated in SaveDataItems here.
virtual string ProgressMarkerKey
  • Readable: yes
  • Writable: yes
  • Helps execute blocks that are meant to respond to a GameSaveData being loaded. See ProgressMarker for more details.

Constructors

GameSaveData()

  • Default.
GameSaveData(GameSaveData other)
  • Copy constructor.
GameSaveData(string sceneName, int slotNumber = -1, ICollection items = null)
  • Initializes this with the passed state values.

Public Methods

virtual void SetFrom(GameSaveData other)

  • Turns the calling instance into a deep copy of the passed one.
virtual void UpdateTime()
  • Updates LastWritten with the time that this was called on.
override void Clear()
  • Clears all state this holds.

Clone this wiki locally