Method LoadFromFileAsync
LoadFromFileAsync<T>(string, Action<T>, int)
Loads JSON data from a file asynchronously as a coroutine.
Declaration
public static IEnumerator LoadFromFileAsync<T>(string filePath, Action<T> onComplete, int bytesPerStep = 1048576)
Parameters
| Type | Name | Description |
|---|---|---|
| string | filePath | Path to the file to read. |
| Action<T> | onComplete | Callback invoked with the deserialized data. |
| int | bytesPerStep | Maximum characters read per frame. |
Returns
| Type | Description |
|---|---|
| IEnumerator | An enumerator for coroutine execution. |
Type Parameters
| Name | Description |
|---|---|
| T | Type to deserialize. |