LDKSceneManager
typedef struct LDKSceneManager{
LDKScene *scenes;
u32 scene_count;
const LDKScene *current_scene;
LDKSceneSystems current_systems;
u32 pending_scene_index;
bool has_pending_scene;
bool is_initialized;
}LDKSceneManager;
typedef struct LDKSceneManager{
LDKScene *scenes;
u32 scene_count;
const LDKScene *current_scene;
LDKSceneSystems current_systems;
u32 pending_scene_index;
bool has_pending_scene;
bool is_initialized;
}LDKSceneManager;
typedef struct LDKSceneManagerConfig{
const LDKAssetPath *scenes;
u32 scene_count;
const XSmallstr *names;
}LDKSceneManagerConfig;
Get a scene by its index in the scene manager.
LDK_API const LDKScene * ldk_scene_manager_at(
const LDKSceneManager *manager,
u32 index
);
const LDKSceneManager *manageru32 indexPointer to the requested object or data; NULL when unavailable.
Exchange ownership of catalog arrays while stopped, without touching ECS, systems or pending scene contents. The caller receives the old catalog and must free it. The current scene is remapped by path, or detached if removed. No allocation is performed. On failure neither array changes ownership.
LDK_API bool ldk_scene_manager_catalog_exchange(
LDKSceneManager *manager,
LDKScene **scenes,
u32 *count
);
LDKSceneManager *managerLDKScene **scenesu32 *countTrue if the operation succeeds; false otherwise.
Validate editable catalog entries without loading any scene.
LDK_API bool ldk_scene_manager_catalog_validate(
const LDKScene *scenes,
u32 count
);
const LDKScene *scenesu32 countTrue if the operation succeeds; false otherwise.
Reads [scenes] from a project manifest or runtime INI. count=N, 0.path=relative.scene, 0.name=Friendly name, ... Indices are contiguous from zero; names are optional. Paths are logical asset paths. An absent/empty catalog configures no scenes. On parse failure the existing catalog and scene remain unchanged.
LDK_API bool ldk_scene_manager_configure_file(
LDKSceneManager *manager,
const char *ini_path,
LDKSceneResult *result
);
LDKSceneManager *managerconst char *ini_pathLDKSceneResult *resultTrue if the operation succeeds; false otherwise.
Get the number of scenes in the scene manager.
LDK_API u32 ldk_scene_manager_count(const LDKSceneManager *manager);
const LDKSceneManager *managerNumber of matching entries.
Find a scene registered with the manager.
LDK_API const LDKScene * ldk_scene_manager_find(
const LDKSceneManager *manager,
const char *path
);
const LDKSceneManager *managerconst char *pathPointer to the requested object or data; NULL when unavailable.
Initializes an empty Scene Manager.
LDK_API bool ldk_scene_manager_initialize(LDKSceneManager *manager);
LDKSceneManager *managerTrue if the operation succeeds; false otherwise.
Replaces the current game scene catalog. The supplied catalog is copied. Passing NULL removes the current catalog and leaves the Scene Manager initialized but unconfigured. Replacing or removing the catalog unloads the complete current ECS scene. If a new catalog cannot be copied or the ECS cannot be cleared, the previous configuration remains unchanged.
LDK_API bool ldk_scene_manager_override(
LDKSceneManager *manager,
const LDKSceneManagerConfig *config
);
LDKSceneManager *managerconst LDKSceneManagerConfig *configTrue if the operation succeeds; false otherwise.
Clear the state of the scene manager pending.
LDK_API void ldk_scene_manager_pending_clear(LDKSceneManager *manager);
LDKSceneManager *managerProcess/cancel a scene switch requested during an update callback.
LDK_API bool ldk_scene_manager_process_pending(LDKSceneManager *manager);
LDKSceneManager *managerTrue if the operation succeeds; false otherwise.
The associations of the scene currently open in the ECS.
LDK_API const LDKSceneSystems * ldk_scene_manager_systems_get(const LDKSceneManager *manager);
const LDKSceneManager *managerPointer to the requested object or data; NULL when unavailable.
Unloads the current scene and frees the copied catalog.
LDK_API void ldk_scene_manager_terminate(LDKSceneManager *manager);
LDKSceneManager *manager