ES3.LoadInto
Description
Loads the value from a file with the given key into an existing object, rather than creating a new instance.
A KeyNotFoundException or FileNotFoundException will be thrown if the data does not exist. You can use ES3.KeyExists or ES3.FileExists to check if the data exists before loading.
Parameters
key | The unique key which identifies the data we're loading. |
obj |
The object of type T we want to load the data into. |
filePath |
[Optional] The relative or absolute path of the file we want to load from. |
T | [Optional] The type of the data we wish to load. Can be an inherited type. |
settings |
[Optional] The settings we want to use to override the default settings. |
Examples
1 2 |
// Load a Transform from a key in a file into an existing Transform component. ES3.LoadInto("myTransform", this.transform); |