Paths
In Easy Save, a path points to a particular piece of data. For example, we might use a path to tell Easy Save where to save something, or where to load something from.
We can also add Parameters to the end of paths to specifying settings.
Key
A key identifies a single piece of data, and is used in the same way as keys in PlayerPrefs.
C#
ES2.Save(data, "myKey");
JS
ES2.Save(data, "myKey");
File
This specifies a file, which you can save a single piece of data to, or multiple pieces of data using Tags.
If you just specify a filename, it will save that file relative to Easy Save’s default save location.
You may also specify an absolute path, which must begin with either a Windows drive letter (C:/) or a slash (/ or \).
C#
// Relative file ES2.Save(data, "myFile.txt"); // Absolute file ES2.Save(data, "C:/Users/User/myFile.txt");
JS
// Relative file ES2.Save(data, "myFile.txt"); // Absolute file ES2.Save(data, "C:/Users/User/myFile.txt");
Folder
This specifies a folder, in which you can save data. You can have relative or absolute folders, in the same way you can relative and absolute files.
A folder path must end with a slash (/ or \).
C#
// Relative folder ES2.Exists("myFolder/anotherFolder/"); // Absolute folder ES2.Exists("C:/Users/User/myFolder");
JS
// Relative folder ES2.Exists("myFolder/anotherFolder/"); // Absolute folder ES2.Exists("C:/Users/User/myFolder");
URL
A URL is used when saving and loading from web using ES2Web.
A URL path must begin with https:// or https://.
C#
ES2Web
web =
new
ES2Web
(
"https://www.site.com"
);
JS
ES2Web
web =
new
ES2Web
(
"https://www.site.com"
);