Saving Game State w/ Scriptable Objects

Ok so I’ve been looking for a solution for this for a while and found none, which I think is pretty weird as I believe it is quite a common problem for any fairly complex game. I am building a 2D endless runner with a shop where you can buy/unlock other characters. These characters consist of Scriptable Objects with few fields: cost, sprite (image of character) etc… Basically I need a way to store a list of player’s unlocked characters + current character, as well as current money. (This concept applys to more complex games where you need to unlock weapons or abilities (which are edited in the editor-scriptable objects)).

It is definitely doable. You cannot save the whole scriptable object so the solution is to create a serilizable class that holds that data and have your scriptable object implement methods to save to and load from this data class.

I recently wrote a blog post about it, check it out: Scriptable Object Variables – Ondrej Paska Blog