I’m having a bit of trouble with saving and loading, I’m using XML files to save the game and i want my game to pull name of the character from the XML file to label the character slots, the trouble is i don’t know how to go about doing that in C#. can anyone help?
I you just want to save a name, you could also use PlayerPrefs :
To save using XML files, you could use
For example, create a class representing the player character et serialize an instance into a xml file.
When you want to load, deserialize it to get the instance back.
The main problem of using xml file is that it is really easy for players to cheat, because it easy to edit a savefile written in xml.