Save in SuperTiles is organized as a composition on C# plain classes. As Unity doesn’t support reference serialization by default, all fields with reference types inherited from System.Object should be marked with SerializeReference attribute.

Class which contains whole game info is called GameSave

Изображение выглядит как текст????Автоматически созданное описание

It consists only of 3 fields:

  1. Version field to check compatibility between current build and save file. And if versions mismatch then several handlers could be made to update save file (not implemented it this asset)
  2. Timestamp could be used to form appropriate save order.
  3. GameEntity stores info about level that should be loaded and the battle state

SaveController creates an instance of GameSave class inside Save method logic.

Created with the Personal Edition of HelpNDoc: Effortlessly bring your documentation online with HelpNDoc