API reference
Class AssetLoadContext
Namespace: MicroEngine.Content
Assembly: MicroEngine.Content.dll
Guide: Assets
What a loader is asked to load, and the content it reads it from.
public sealed class AssetLoadContextInheritance
Properties
Key
The asset asked for (kind, normalized path, options, variant).
public AssetKey Key { get; }Property Value
Options
The load settings, or null for the loader’s defaults.
public object? Options { get; }Property Value
Path
The asset’s path in Source.
public string Path { get; }Property Value
Source
Where the files are.
public IContentSource Source { get; }Property Value
Methods
Files(string?)
The files directly inside folder (the asset’s own path when null), in ordinal order.
public IReadOnlyList<string> Files(string? folder = null)Parameters
folder string?
Returns
Exceptions
The folder is missing or outside the source.
ReadBytes(string?)
The whole file at path (the asset’s own path when null).
public byte[] ReadBytes(string? path = null)Parameters
path string?
Returns
byte[]
Exceptions
The file is missing, wrongly cased or outside the source; the message names this asset.