303 words
~2min read

Unity Save Game Editor

November 18th 2019
155K views

In game development there's a lot of scratching your own itch and my latest diversion is a great example of that.

More often than I care to count, when I’m working on a new feature for Macrocosm something gets in a weird state and I need to see what’s going on with the save. Once I figure out what happened and attempt a fix, it would be super nice to be able to then edit the save game and put it back to a correct state to test from.

Macrocosm Stage 1

After thinking about it enough I decided to take the time from main game development and make this tool that should speed up future dev time.

Enter the Unity Save Game Editor.

In action

Once you set your save game path & extension and choose which save file you want to work on, the editor will display a tree of all the loaded data you can then dig into and edit!

On each row there are contextual controls for resetting values, and adding or removing items from a collection. While there are a few more things I wish it had, it suits my needs for now and I think it’s in a good state to give it to the world and hopefully have other people help contribute to it to.

This will work if your save game is simply serializing a data structure, something like this:

public void SaveGame(){
    BinaryFormatter bf = new BinaryFormatter();
    FileStream file = File.Create(savePath);
    bf.Serialize(file, gameData);
    file.Close();
}

And on that note, go check out the project on GitHub!

dshook
/
UnitySaveEditor
Waiting for api.github.com...
00K
0K
0K
Waiting...

Once you have it copied into your project in an editor folder (in my case: Assets/Editor/SaveEditor) you should see the menu item to open it in Unity’s window menu:

Unity SaveEditor Menu

Want the inside scoop?

Sign up and be the first to see new posts

No spam, just the inside scoop and $10 off any photo print!