Engine → Assets → asset_importer.h
asset_importer
| Type | Class |
| Namespace | conjure::assets |
| Include File Path | engine/include/conjure/assets/asset_importer.h |
| Source File Path | engine/src/assets/asset_importer.cpp |
| API ↗ | Database, importers and hot reload, Assets |
Syntax
Derived Classes
Classes that use this as a base
Constructors
| Access | Signature | Description |
|---|---|---|
| public | asset_importer(); |
Important
Copy constructor and assignment has been deleted.
Destructors
| Access | Signature | Description |
|---|---|---|
| public | virtual ~asset_importer(); |
Functions
Public
default_settings
default_settings[[nodiscard]] virtual core::json::document default_settings() const;Settings written into a new .meta. The default is an empty object.
extensions
extensions[[nodiscard]] virtual std::span<const std::string_view> extensions() const noexcept = 0;The extensions this importer claims for a file without a .meta: lower-case, with the dot (".png"), matched case-insensitively. An importer may read formats it does not claim because another importer owns them by default; those files reach it when their .meta names it (a .glb as collision geometry instead of a render model).
id
id[[nodiscard]] virtual std::string_view id() const noexcept = 0;Stable identifier recorded in every .meta ("conjure.renderer.gltf").
import
import[[nodiscard]] virtual core::result<import_output> import(
import_context &context) const = 0;Worker thread. Const, deterministic, touches no shared state beyond the context.
version
version[[nodiscard]] virtual u32 version() const noexcept = 0;Bump to invalidate every blob this importer produced.