Save
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:
- 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)
- Timestamp could be used to form appropriate save order.
- 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