ES2.LoadObject
Parameters
path | The path where our data is stored. For more information, see Paths. |
settings |
Optional. A user-created ES2Settings object containing options not specified in path. |
Returns
object | Our loaded data as a System.Object |
Description
Loads the data of from a file as a System.Object.
Note that this is not a method of loading references, but is simply an ES2.Load method without the generic parameter. Data should be cast to a System.Object afterwards.
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 = (Vector3)ES2.LoadObject("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 = (Vector3)ES2.LoadObject("myFile.txt?tag=myPosition"); |