ES2.Save
Parameters
data | The data we want to save. Must be on the Supported Types list. |
path |
The path where we want to store our data. For more information, see Paths. |
settings |
Optional. A user-created ES2Settings object containing options not specified in the path. |
Description
Saves our data to the specified path.
C#
1 2 3 4 5 |
// Save the position of this GameObject. ES2.Save(transform.position, "myFile.txt?tag=myPosition"); // Load the position we saved and assign it to this GameObject. transform.position = ES2.Load<Vector3>("myFile.txt?tag=myPosition"); |
JS
1 2 3 4 5 |
// Save the position of this GameObject. ES2.Save(transform.position, "myFile.txt?tag=myPosition"); // Load the position we saved and assign it to this GameObject. transform.position = ES2.Load.<Vector3>("myFile.txt?tag=myPosition"); |