Skip to content

KernelAPI reference

Struct AssetInfo

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

One loaded asset, as Loaded lists it.

C#
public readonly struct AssetInfo : IEquatable<AssetInfo>

Implements

IEquatable<AssetInfo>

Constructors

AssetInfo(string, string, long, double, bool)

One loaded asset, as Loaded lists it.

C#
public AssetInfo(string Path, string Kind, long Bytes, double LoadMilliseconds, bool DuringPlay)

Parameters

Path string

Its content path.

Kind string

“texture”, “atlas”, “font”, “folder atlas”, or the kind of another loader (AssetLoaderRegistry).

Bytes long

Memory it takes now, as its loader reports it: device memory for textures (font pages grow as glyphs are drawn), decoded samples for sounds, the file for music.

LoadMilliseconds double

Time spent reading, decoding and uploading it.

DuringPlay bool

Whether it was loaded after the game’s first update, when a slow load shows as a hitch.

Properties

Bytes

Memory it takes now, as its loader reports it: device memory for textures (font pages grow as glyphs are drawn), decoded samples for sounds, the file for music.

C#
public long Bytes { get; init; }

Property Value

long

DuringPlay

Whether it was loaded after the game’s first update, when a slow load shows as a hitch.

C#
public bool DuringPlay { get; init; }

Property Value

bool

Kind

“texture”, “atlas”, “font”, “folder atlas”, or the kind of another loader (AssetLoaderRegistry).

C#
public string Kind { get; init; }

Property Value

string

LoadMilliseconds

Time spent reading, decoding and uploading it.

C#
public double LoadMilliseconds { get; init; }

Property Value

double

Path

Its content path.

C#
public string Path { get; init; }

Property Value

string

Methods

Deconstruct(out string, out string, out long, out double, out bool)

C#
public void Deconstruct(out string Path, out string Kind, out long Bytes, out double LoadMilliseconds, out bool DuringPlay)

Parameters

Path string

Kind string

Bytes long

LoadMilliseconds double

DuringPlay bool

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(AssetInfo)

C#
public bool Equals(AssetInfo other)

Parameters

other AssetInfo

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(AssetInfo, AssetInfo)

C#
public static bool operator ==(AssetInfo left, AssetInfo right)

Parameters

left AssetInfo

right AssetInfo

Returns

bool

operator !=(AssetInfo, AssetInfo)

C#
public static bool operator !=(AssetInfo left, AssetInfo right)

Parameters

left AssetInfo

right AssetInfo

Returns

bool