- A units category has changed.
- A new unit or type is introduced.
- A unit or type is removed or marked obsolete.
- A unit or types namespace changed.
- A unit or types declaration has changed, including method signatures.
*If you are a C# programmer, you can alternatively use the attribute [RenamedFrom(string previousName)] and include the previous type name, including namespaces to prevent a regeneration.*
*Units, Graphs, Macros, ect, SHOULD NOT be included in the unit options window unless you need access to the internal scripts methods and variables.*
How do I regenerate units?
In the unity menu goto Tools > Bolt > Build Unit Options.
Saved Variables are awesome, but you may want to choose something that gives you more freedom and protection from easy modification. Binary Save fills that gap. It uses Odin Serializers' Binary Formatter to encrypt the data, and decrypt it back out into usable variables. It is very easy to start saving your data.
CREATING SAVE DATA
When creating save data, you have two options available. One is to create it before we save, the other to create it when we save. You will want to use Create Binary to make a new save data if you intend to pass it around as a reference before saving new data. You can find the unit in the IO folder in the fuzzy finder.
Create Save takes a integer 'Count' for the amount of variables you will create. It can be used like so:
Subsequently, when saving data we can create it in the same way but on the Save Binary unit. The unit comes with 3 different graph inspector toggles.
First there is the 'Persistant Data Path' to turn off and on a custom path. This is true by default. 'Append' will allow the save to not overwrite any data unless the name matches. This is defaulted to false. All previous data will then remain if untouched. Then there is 'Promote To Input Port', which replaces saving data on the unit, with an input port for the previously created or loaded data. This is true by default.
GameObjects and components CANNOT be saved. You will have to iterate and manually grab there properties you want to save. This is a Unity limitation, but I am going to try to find a way to save and load them through reflection at some point. Perhaps using a 'container' that pulls all properties into a dictionary, and spits them out. But would require some new units I think.
LOADING SAVE DATA
Loading save data is as easy as specifying the same save name and/or path with the Load Binary unit.
Binary Save has the same set of units as the regular variables do. 'Get', 'Set', and 'Has'. Binary also includes the ability to 'Remove' variables as well.
All content unless stated is Copyright 2019 Life and Style Media, LLC.
Images, logos, and icons for Bolt were provided by the product copyright owner, Ludiq. https://ludiq.io