Skip to content
EvilEngine.Api

ContentHandle record struct

public readonly record struct ContentHandle

A reference to one piece of converted content: what kind it is and its id. It’s a small value type, so pass it around and compare it freely.

A Plugin gets one from PluginContext.Content. Nothing in the engine hands one out yet, since nothing implements PluginContext.

Assembly
EvilEngine.Api
Commit
4ff877b1

Members

ContentHandle constructor

public ContentHandle(ContentKind Kind, ContentId Id)

Makes a handle from a ContentKind and a ContentId. It doesn’t check that the content exists or converts.

Kind property

public ContentKind Kind { get; init; }

The ContentKind, a name. The engine’s own are model, material, texture, sound, map, sky, cell, collision, animation, record, shader, text and music.

Id property

public ContentId Id { get; init; }

The ContentId, a namespace:name pair such as quake:id1/maps/e1m1. The namespace is a mounted game’s name, an adapter’s id or a Plugin’s id. The name is lowercased and always uses forward slashes.