ES3.LoadInto

public static void LoadInto<T>(string key, string filePath, T obj, ES3Settings settings)

Description

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

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

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.

filePath

[Optional] The relative or absolute path of the file we want to load from.

settings

[Optional] The settings we want to use to override the default settings.

Examples

C#

JS