#include <include/flecs.h> FLECS_API bool ecs_staging_begin(ecs_world_t *world)
Begin staging. When an application does not use ecs_progress to control the main loop, it can still use Flecs features such as the defer queue. When an application needs to stage changes, it needs to call this function after ecs_frame_begin. A call to ecs_staging_begin must be followed by a call to ecs_staging_end.
When staging is enabled, modifications to entities are stored to a stage. This ensures that arrays are not modified while iterating. Modifications are merged back to the "main stage" when ecs_staging_end is invoked.
While the world is in staging mode, no structural changes (add/remove/...) can be made to the world itself. Operations must be executed on a stage instead (see ecs_get_stage).
This function should only be ran from the main thread.
world- The world
- Whether world is currently staged.