Skip to content

Engine → Assets

asset_extension_desc.h

Trivially copyable extension records a plugin module registers. The engine's assets_module_consumer calls the factories and forwards the results to register_importer / register_type on attach.

Structs

File Description
asset_type_extension_desc One asset type offered by a module.
importer_extension_desc One importer offered by a module.

Functions

Public

register_asset_type_extension

[[nodiscard]] CONJURE_API core::result<void> register_asset_type_extension(
    asset_type_registry &types,
    const asset_type_extension_desc &desc);

Instantiates the loader of a record and registers the type. INVALID_ARGUMENT when the factory is missing, returns nothing or the loader's type differs from the record's name.

register_importer_extension

[[nodiscard]] CONJURE_API core::result<void> register_importer_extension(
    importer_registry &importers,
    const importer_extension_desc &desc);

Instantiates the importer of a record and registers it. INVALID_ARGUMENT when the factory is missing, returns nothing or the created importer's id differs from the record's.