Skip to content

API reference

Interface IAssetLoader

Namespace: MicroEngine.Content
Assembly: MicroEngine.Content.dll
Guide: Assets

Makes one kind of asset from content files: decodes an image into a texture, a WAV into an audio clip… A loader is registered once per store under its Kind (AssetLoaderRegistry); the store calls it the first time a key of that kind is asked for and shares the result.

C#
public interface IAssetLoader

Properties

AssetType

The type of the objects it makes.

C#
Type AssetType { get; }

Property Value

Type

Extensions

File extensions (lower case, with the dot) this loader is chosen for when only a path is given; empty when it is asked for by kind only.

C#
IReadOnlyList<string> Extensions { get; }

Property Value

IReadOnlyList<string>

Kind

The name requests use for this kind of asset (“texture”, “sound”…), compared ordinally.

C#
string Kind { get; }

Property Value

string

Methods

SizeInBytes(object)

The memory asset takes now, for diagnostics (0 when unknown).

C#
long SizeInBytes(object asset)

Parameters

asset object

Returns

long