Skip to content

Engine → Assets

asset_importer.h

Converts source bytes into cooked payloads. Called on worker threads; must be deterministic (no clocks, no hash-map iteration order in the output) and touch no state beyond the context.

Structs

File Description
import_output Result of an import: exactly one entry has an empty sub path.
imported_asset One cooked asset produced by an import: the primary (empty sub path) or a sub-asset.

Classes

File Description
asset_importer Converts source bytes into cooked payloads. Called on worker threads; must be deterministic (no clocks, no hash-map iteration order in the output) and touch no state beyond the context.
import_context Everything an importer may read or ask for during one import.
importer_registry The registered importers. Registration on the main thread; find* from any thread between registrations. Pointers stay valid until the importer is unregistered.
sub_asset_table Thread-safe table of sub-asset uuids for one source: ids already in the .meta are returned as recorded, new sub paths are allocated under a mutex and merged back on the main thread.

Type Aliases

asset_path_resolver

using asset_path_resolver = std::function<std::optional<asset_id>(std::string_view assetPath)>;

Resolves a mount-relative source path to the uuid of its primary asset.