Skip to content

Engine → Scene

register.h

Registration entry points the engine's scene_subsystem calls: the component types (startup step 10), the two asset types with their importers, and the four systems.

Constants

Name Type Value Description
PREFAB_IMPORTER_ID inline constexpr std::string_view "conjure.scene.prefab_importer"
SCENE_IMPORTER_ID inline constexpr std::string_view "conjure.scene.scene_importer"
SYSTEM_APPLY_HIERARCHY_CHANGES inline constexpr std::string_view "scene.apply_hierarchy_changes"
SYSTEM_APPLY_PENDING_LOADS inline constexpr std::string_view "scene.apply_pending_loads"
SYSTEM_DESTROY_PENDING inline constexpr std::string_view "scene.destroy_pending"
SYSTEM_PROPAGATE_TRANSFORMS inline constexpr std::string_view "scene.propagate_transforms"

Functions

Public

register_asset_types

[[nodiscard]] CONJURE_API core::result<void> register_asset_types(
    assets::asset_type_registry &types,
    assets::importer_registry &importers,
    const ecs::component_registry &registry);

Registers conjure.scene.scene and conjure.scene.prefab (version 1) with loaders that parse on the worker against registry, and the .scene.json / .prefab.json importers.

register_components

[[nodiscard]] CONJURE_API core::result<void> register_components(
    ecs::component_registry &registry);

Registers every scene component in a fixed order (idempotent per registry) and verifies the asset_ref layout contract of the bind pass. Errors are the registry's (NAME_CONFLICT, ...).

register_systems

[[nodiscard]] CONJURE_API core::result<void> register_systems(
    ecs::scheduler &scheduler,
    scene_manager &scenes);

Adds scene.apply_pending_loads (FRAME_BEGIN), scene.apply_hierarchy_changes and scene.propagate_transforms (TRANSFORM) and scene.destroy_pending (FRAME_END, after scripting.frame_end), all RUNS_WHILE_PAUSED. The manager must outlive the scheduler. Call once per scheduler: a second call returns NAME_CONFLICT from its first system and adds nothing.