Good afternoon.
Is there really no way to save a game as a scene? I’m still on my first game and so far I haven’t needed it, and I still don’t understand how to save using a json file
Not at runtime, no.
Let us know what exactly you don’t understand and we can help.
If you look around there’s plenty of resources on how to save (or: “serialize”) game data to a “savegame” file with any kind of file format. The strategy depends on WHAT you need to save, and that’s something only you can know.
Do consider that if you want to restore a GameObject, it’s not about saving the entire object but just enough of its state to, well, restore its intended state. Perhaps the object could be instantiated from a prefab as usual, it only needs to be at the most recent position? In that case you’d only need to save transform.position and perhaps transform.rotation properties and then read them back in and assign them.
I’m trying to save a 100x100 matrix and I can’t find a way to do it, I’m stuck. later on I may need to do the same for a 100x100x10 matrix;
for positions like the character and camera, I was able to save and load.
I managed to transform the 100x100 matrix into a 10000 matrix.
100x100 matrix of what though? You didn’t answer CodeSmile’s question either. What part of the process of saving/loading are you having trouble with?
In any case, the first thing to learn with save games is how to read and write a file. Can’t really save a game when you haven’t got the grips with that yet; and thankfully it’s pretty simple and should be plenty of tutorials out there on it.
Then you use a serialisation library to turn your data into a string you can write to disk, and then the same in reverse to load said data.