ES3File.LoadInto

public void LoadInto<T>(string key, T obj)

Description

Loads the value from the ES3File with the given key into an existing object, rather than creating a new instance.

KeyNotFoundException will be thrown if the key does not exist. You can use ES3.KeyExists or ES3.FileExists to check if the data exists before loading.

Parameters

T The type of the data we wish to load. Can be an inherited type.

key

The unique key which identifies the data we're loading.

obj

The object of type T we want to load the data into.

Returns

The loaded data of type T, or the default value if using the defaultValue parameter and there is no data to load.

Examples

C#

JS