ES2.Save

public static void Save(T data, string path, ES2Settings settings=null)

Parameters

[table th=”0″]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.”[/table]

Description

Saves our data to the specified path.

C#

// 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

// 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");