LoadAsync

LoadAsync(string key, Transform transform, CancellationToken cancellationToken = default)

Purpose: Asynchronously loads data and applies it to a Transform object.

Parameters:

  • key: A string used to generate the load path.

  • transform: The Transform object to apply the loaded data to.

  • cancellationToken: A token to signal cancellation.

Return Value: An async Task.

Sample uses:

public async Task LoadAsync()
{
    await TransformSaveManager.LoadAsync(DATA_KEY, _transform, _cancellationToken);
}

Sample uses for multiple objects:

public async Task LoadAllAsync()
{
    await TransformSaveManager.LoadAsync(DATA_KEY, _transforms, _cancellationToken);
}

Last updated