Skip to content

Engine → Assets

asset_type_registry.h

The set of registered asset types. Registration and removal happen on the main thread before systems run (or at plugin attach/detach); lookups are safe from any thread between those calls. Every description lives in its own heap block, so a pointer returned by find() stays valid until that type is unregistered; unregistering one type never moves another description.

Structs

File Description
asset_type_desc One registered type: identity, version, flags and the loader that produces its payloads.
asset_type_registry_hooks Callbacks the owning asset_manager installs so the registry can refuse to unregister a type that is in use and can prepare pinned fallbacks at registration.

Classes

File Description
asset_type_registry The set of registered asset types. Registration and removal happen on the main thread before systems run (or at plugin attach/detach); lookups are safe from any thread between those calls. Every description lives in its own heap block, so a pointer returned by find() stays valid until that type is unregistered; unregistering one type never moves another description.

Functions

Public

make_asset_type_desc

template <declared_asset_type AssetType> [[nodiscard]] asset_type_desc make_asset_type_desc(
    std::unique_ptr<asset_loader> loader,
    u32 version = 1,
    asset_type_flags flags = asset_type_flags::NONE);

Builds a description from the loader's type and the traits name; the id comes from the name.