Basic Saving and Loading

Looking for how to use Easy Save with Playmaker? Take a look at our Playmaker Guide.

To save variables, we use ES2.Save(variable, path).

The first parameter is the variable we want to save, and it must be a variable on the Supported Types list.

The second parameter is a path which we use to identify the data we are saving. This could be a simple name, a filename, a path to a file and many other things.

C#

JS

You load variables using ES2.Load<Type>(path), where ‘Type’ is the type of variable you are loading. You should use the same path as you used to save the data.
If you are not sure whether there will be data to load or not, you should use ES2.Exists(path) before hand to check if the data exists.

C#

JS

Because of the way Components work in Unity, we should provide Easy Save with a Component to load our data into.

We do this using the self-assigning load method: ES2.Load(path, component).

C#

JS