Skip to content

Engine → Scripting

script_system.h

The six EXCLUSIVE scripting systems. All managed execution happens inside them on the main thread, so scripts may mutate the world directly except inside a DOD query scope.

Forward Declarations

hot_reload_controller

class hot_reload_controller;

Constants

Name Type Value Description
SYSTEM_COLLISION_DISPATCH inline constexpr std::string_view "scripting.collision_dispatch"
SYSTEM_FIXED_UPDATE inline constexpr std::string_view "scripting.fixed_update"
SYSTEM_FRAME_BEGIN inline constexpr std::string_view "scripting.frame_begin"
SYSTEM_FRAME_END inline constexpr std::string_view "scripting.frame_end"
SYSTEM_LATE_UPDATE inline constexpr std::string_view "scripting.late_update"
SYSTEM_UPDATE inline constexpr std::string_view "scripting.update"

Functions

Public

register_script_systems

[[nodiscard]] CONJURE_API core::result<void> register_script_systems(
    ecs::scheduler &scheduler,
    script_runtime &runtime,
    hot_reload_controller *reload = nullptr);

Registers scripting.frame_begin (FRAME_BEGIN: reload tick, flush), scripting.collision_dispatch and scripting.fixed_update (FIXED_UPDATE, dispatch before update), scripting.update (UPDATE), scripting.late_update (LATE_UPDATE) and scripting.frame_end (FRAME_END: flush). reload may be null; when set, frame_begin ticks it with the frame time. The runtime and controller must outlive the scheduler. Call once per scheduler: a second call returns NAME_CONFLICT from its first system and adds nothing.