Save System (Binary Encryption)

JasonJonesLASM 4 years ago updated by Eduard_de_Bruyn 1 year ago 18

This is a system for saving and loading data to/from files with your own extensions using binary encryption. Right now the basic way is player prefs, but it is easy for people to change that data. I tried my best to get this as simple as possible. Right now you only save to persistantDataPath. I will eventually add a path input, and other non serializable types (GameObjects, Vectors, ect). Though that is some time off, since I am working on a game at the moment. For now you can save X, Y, Z as separate variables.


  • Saving takes 4 nodes total: A Macro "New Binary Variable", a value of some sort, a generic new list, and the Macro "Save Binary Variables".
  • New Binary Variable sets up a variable with a new dictionary item that has only two variables. A Value, and a Variable Name. The variable name as a string will be your key in this dictionary, and the value which is assigned to that string. These are known here as our Binary Variables. 
  • You will populate a list of Binary Variables into a new generic list. You only need one item in the list, but you can have as many as you want.
  • "Save Binary Variables" is the actual function to save to a file. Type in a filename with a custom extension. And populate that file with the output of your new list.


  • Loading takes 2 nodes: Load Binary Variables and Get Binary Variable.
  • Load Binary Variables just needs your filename to access it. 
  • Drag out the Variables and add Get Binary Variable. Type in a Variable name to retrieve that variable. Use the output value to return the value from that variable.

That is it. I will be adding some stuff soon. Download below. And see the replies for updates.


Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

Tips -

Create a Data Type using your own Super Unit as an easy way to save, making sure your variable names are never wrong.

Where are the save files stored by default?


Are you on PC or Mac? It's in the persistent data path for your OS. An FYI you should probably hold off on using this for anything serious. It will replace the whole written file everytime. So when you create a a new file it must match if you expect to get it in the future. Bad practices, but I hadn't expanded it yet. I'm actually working on native units to replace this. Like this and all its mistakes will be gone, as well as support for non standard types, and choosing between a custom path and persistent data path.. 

PC, and nice, any ETA on the new version?

I'm finishing up a helper pack, and array2d. So probably start next week or end of this. Looking for anything particular out of this? The object for me was to load and save any variable of any type, as any type at any time. Just how variables work in Bolt.

Nothing to complex I mostly need to save strings, ints and floats since I am working on management game with rpg elements so mostly saving the character and building stats.

Cool that will come right out of the gate. Also the path is Users/YourName/AppData/ I think roaming or local and your company name of the project.


This is also Very Cool! Your excellent work brings up something I think the Bolt author and Macro authors needs to address in the near future. That question is:  Can you create a plugin (Macro) system for Bolt that will allow you to sell your work (through the Asset Store, or otherwise) as a plugin (add-on) for Bolt itself? I ask because you have produced some tools here that offer a real value to Bolt (and Unity itself) and I think as time goes on with Bolt user-base growth, I think it would be a real value-add for Bolt, and it would allow the plug-in authors to also reap some reward for their work and efforts. Hey, I like free stuff just as much as you all do. But, as a software developer myself (and most of us reading these Bolt forums are) I understand that paid devs stick with their work and keep great tools (like this) updated and going. Whereas, free ones usually tend to end up vaporware in a year or two. Digital food for thought authors.

Cheers, and thanks again for these great tools JJ!

No problem. I don't know Lazlos thoughts on this, but I can get behind that. I don't personally want to make a dime off doing this, and I will continue to release updates and great polished products regardless of that notion. My money I want to strictly come from the actual entertainment (games) I am providing in the end. These unit things are a part of my business, even though that has nothing to do with why I am doing it, but it will be provided in my website permanently when It goes back up. I better keep it going if I don't want a reputation for being a slacker. 

When I begin my money making opportunity, part of that funding will going into investing more options to release for free and update, and possibly getting help with that. At this moment, I have 0 itches to work outside of Bolts environment, and I don't expect a change in that anytime soon.

I see Bolt as a huge investment in my future and the future of many. So as long as other developers who do want to do this, don't mind another Free solution possibly popping up for Bolt, and don't get there panties in a bunch, I'm all for this. Because personally, I just want game development to be more fun, less head banging, for rookies or advanced users immediately, not after you hit the hard part, then realize you either need to grind or shell out money. 

Regardless, I'll support all who wish to in a positive way.

* Side Note: if I ever do stop supporting a set of units, I plan to release the source.

* Side Side Note: If anyone does try to use this, be warned, a native version on the way this week that does this but right, and 10,000x better. It will support custom paths or persitantAppData, inline hard types variables on the create new variable, and not be weird and replace the whole file. It'll only edit what you send in that matches, or add it if it is new. I will be updating this often with new types allowed, I recently found a way to create something that adds types in to the serialize/deserialize process. It should be possible to create one that does this automatically, eventually.

Question, will this system include the ability to create a save folder in the game's folder? Also any ETA for the update?

I've been working on it off and on with very little success accomplishing what I wanted from it. Serialization is probably my weakest suit. So I went and bought Save Game Pro, seems good and there is a free open source version,  made for 2017+. You should try it out. Sorry this didn't work out right now, maybe try tackling it again in the future.

Oh pity, well, the current version serves my purposes, still hope this project isn't totally dead. On a some what related note I have been having this error with version 1.2.2 of Bolt, version 1.2.1 still works fine.

Glad it works, probably because I'm using an interface Dictionary, not just IDictionary like Bolt, but IDictionary<string, object>. I could probably fix up the stuff that previously exists like that and adding a path. But I'm not too well versed in Surrogates to do the other extended stuff I had planned for.  I was writing as I was learning it, and just spending way too much time on it for what it's really worth. 

I found that new solution because I needed something now as well, and it's got a free version with source, made for 2017+, and does more than mine, simple, and works with Bolt easily. Doesn't sound like anyone, including myself would benefit any better by me doing the same thing with just a couple different parameters. But I'll fix up what I have, just to keep this solution working. This was literally thought up like 2 days ago. I was still active on this till that point. So I'm not trying to keep you in the dark, I did initially start work on it when I said I would.  Just never came to a satisfactory point, where I could release something of any real benefit.

This is pretty much what I've been looking for, for a while. I made my own very similar but yours was more refined and had the ability to serialize a dictionary.

I do have one issue though -

InvalidConversionException: Cannot convert from 'Ludiq.AotDictionary' to 'System.Collections.Generic.Dictionary`2[System.Object,System.Object]'.
Ludiq.ConversionUtility.Convert (System.Object value, System.Type type, Ludiq.ConversionUtility+ConversionType conversionType) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Reflection/ConversionUtility.cs:472)
Ludiq.ConversionUtility.Convert (System.Object value, System.Type type) (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Runtime/Reflection/ConversionUtility.cs:215)
Bolt.Flow.GetValue (Bolt.ValueInput input, System.Type type) (at C:/Users/lazlo/Projects/Bolt1/Package/Bolt.Flow/Runtime/Flow.cs:590)

How can I overcome this? Is it possible?


Thanks for reporting this, but I'd recommend upgrading to our custom unit version. This has been around for more then a year and still gains support. Infact will get an upgrade after my new website is complete. It's better and more robust.

Use this: http://lifeandstylemedia.com/assets/bolt/binarysave/manual.php

Not really sure what the issue is your experiencing. Is that the internals of our macro or something you're doing? Because those shouldn't be used manually if so. 

I'd upgrade and make sure you follow that and only use what's in the manual. If you still have an issue I'll look into it further. We actually use Odin now for Serialization. Much better by a long shot. So if this is a Serialization issue, it should do it better. Almost guaranteed.


Absolutely fantastic! Thank you so much for your response! I tested it out and it works perfectly!



Is this still available? The link is dead when I navigate to it. Or do I have to use UAlive to recreate the save system?