The map:
The map is generated and players can move up the map by clicking on various nodes, where they are then loaded into a new scene based on the node.
Basically the way my map is generated is through this process:
1. Generate the maximum nodes
2. Cull nodes based on chance
3. Generate paths between nodes based on chance
4. Ensure there are always a path upwards on each column
5. Change node types
This is all done on the 'Map.cs' script. Each node contains two list of gameObjects, forwardNodes and backwardNodes.
My question is how can i effectively save the map state, so that if my game was closed and the Player opened up their profile and resumed gameplay, the map would be the same as they left it?
I have tried saving the map gameobject (which contains all the nodes, paths etc as children) by doing:
Code: Select all
ES3.Save<GameObject>("map", map);
Code: Select all
ES3.Load<GameObject>("map");
Thanks.
Map object showing its children 'nodes':
Map object showing its generated lines to represent the paths between nodes: