Saving Game Problem

OK, right now, I am making a game in which the player can build whatever they want. I have got quite a lot of it done, but I would really like a save level and a load level function... I have searched around, but all I seem to find are scripts that would be used to store things like player health, or ammo. I would need one that would do the following things:

  • Save all objects positions (only x and y though, not working with z)
  • Save all objects rotations
  • Save all objects localscale
  • Save all objects components

  • Load all of that back into the scene when the file is opened

Are there any tutorials out there to do this sort of thing? A unique save file format would be ideal, but I have never worked with anything like XML.


If you want to see how the game is getting on, you can download it from HERE (The name of the game is KREATE).

Thank You!

The scripts you found that store the health, ammo, etc, probably store them in variables. Why don't you use this script, but alter it to store the things you want, but turn them a variable? Understood? Like, turn the player's position, rotation, scale, and whatever you want in variables, then, use the scripts you found (those you said only store health and ammo) to store the variables you created. I'm not familiar with XML too, but i think this idea is at least the base to your save/load system :D Hope i was helpful!