Function ecs_set_automerge


#include <include/flecs.h>

FLECS_API void ecs_set_automerge(ecs_world_t *world, bool automerge)


Enable/disable automerging for world or stage. When automerging is enabled, staged data will automatically be merged with the world when staging ends. This happens at the end of progress(), at a sync point or when readonly_end() is called.

Applications can exercise more control over when data from a stage is merged by disabling automerging. This requires an application to explicitly call merge() on the stage.

When this function is invoked on the world, it sets all current stages to the provided value and sets the default for new stages. When this function is invoked on a stage, automerging is only set for that specific stage.


world - The world.

automerge - Whether to enable or disable automerging.


Line 4308 in include/flecs.h.