Is there a "magic" function that saves the game state for me, instead of me having to manually serialize and code, for easy save/load.
Currently, I could serialize everything required for my game state e.g. the player inventory, health, and so forth, and restore it.
The level is progressively randomly generated too, so I would randomly generate the level and store this in serialized data (e.g. JSON).
This approach works... but it requires a lot of extra code for this save/load logic, when it could technically be done with a quick "function".
Is there an easy way one-liner function to save the "state" of the game, then when someone loads it, it loads that exact "state" of the game? For example, in another Game Engine I tried several years ago, there was a single function called "Save()" which magically saved the entire game state and "Load()" which loaded it, there was no further implementation needed.
Yeah it seems like I have to go the long way after doing some research. It's quite difficult when I want to save the state of all the attacks, bullets, rigidbody velocities, state of explosions. But, it's do-able.
Your answer
Follow this Question
Related Questions
PlayerPref doesnt work 2 Answers
Save Button state(if shown or hidden) 0 Answers
How to Save Values and Currencies without Playerprefs? 0 Answers
Problem With Unity Cloud Save (Google Play Services) 0 Answers
how to save a lot of character data? 1 Answer