Save game - Tile based game
Hello, thanks for taking your time to read this.
I am currently working on a tile based strategy game and only now I thought about looking into implementing save game function. I've been looking online for few days now and I see that my options are Serialization or PlayerPrefs, but I just cant get my head around implementing these into my game.
What would be the best approach to save my tile based map and units data? I have the following that i need to save somehow:
-List<Tile> tileList
- List of Tile scripts that are each attached to their Tile gameobject(inherit Monobehaviour)
stores the following:
string tileType
Vector3 worldCoords
Vector3 cubeCoords
-List<Unit> unitList
- List of Unit scripts, again each of those is attached to a gameobject
stores the following:
Tile currentTile
string unitType
I have tried using serialization, but keep running into problems due to my classes inheriting Monobehaviour. With playerprefs, i dont see how I can store the List of scripts and then recreate them.
Many thanks!
Your answer
Follow this Question
Related Questions
I can't figure out why my score doesn't save/increase 0 Answers
Save/Load Player System 0 Answers
PlayerPrefs saving and Loading 2 Answers
Help offline progression, works on windows but not on Android. 0 Answers