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 VARIABLES TO A FILE
- 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.
Customer support service by UserEcho