Skip to content

Engine → Assets → asset_importer.h

asset_importer

Syntax

class CONJURE_API asset_importer

Derived Classes

Classes that use this as a base

Constructors

AccessSignatureDescription
publicasset_importer();

Important

Copy constructor and assignment has been deleted.

Destructors

AccessSignatureDescription
publicvirtual ~asset_importer();

Functions

Public

default_settings

[[nodiscard]] virtual core::json::document default_settings() const;

Settings written into a new .meta. The default is an empty object.

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

[[nodiscard]] virtual std::string_view id() const noexcept = 0;

Stable identifier recorded in every .meta ("conjure.renderer.gltf").

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

[[nodiscard]] virtual u32 version() const noexcept = 0;

Bump to invalidate every blob this importer produced.