ES2.LoadArray

public static T[] LoadArray<T>(string path, ES2Settings settings=null)

Parameters

T The type of the data in the array we want to load. Must be on the Supported Types list.

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

T[ ] Our loaded array.

Description

Loads an native array containing data of type T from the specified path.

C#

JS

public static void LoadArray<T>(string path, T[] components, ES2Settings settings=null)

Parameters

T The type of the data in the array we want to load. Must be on the Supported Types list and be a Component/MonoBehaviour.

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.

Description

Loads an native array containing data of type T from the specified path, into the values in the array provided as a parameter.

The array provided as a parameter should be the same length as the data we’re loading, and be filled with Components of the same type that we’re loading. The data we’re loading will then be loaded into each of these Components.

C#

JS