Skip to content

KernelAPI reference

Class AssetBatch

Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time

Assets started by Preload: progress for a loading screen, errors, and a way to wait.

C#
public sealed class AssetBatch

Inheritance

object ← AssetBatch

Properties

Completed

How many are finished (loaded or failed).

C#
public int Completed { get; }

Property Value

int

Count

How many assets the batch holds.

C#
public int Count { get; }

Property Value

int

Errors

The assets that could not be loaded.

C#
public IReadOnlyList<AssetLoadException> Errors { get; }

Property Value

IReadOnlyList<AssetLoadException>

IsDone

Whether every asset is finished.

C#
public bool IsDone { get; }

Property Value

bool

Progress

Finished share, from 0 to 1 (1 for an empty batch).

C#
public float Progress { get; }

Property Value

float

Methods

Wait()

Finishes every asset of the batch now, on this thread (decoding what workers have not finished).

C#
public void Wait()

Exceptions

AggregateException

Some assets could not be loaded; Errors lists them.