Function set_automerge


#include <include/flecs/addons/cpp/world.hpp>

void set_automerge(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.


automerge - Whether to enable or disable automerging.


Lines 351-353 in include/flecs/addons/cpp/world.hpp.

void set_automerge(bool automerge) {
    ecs_set_automerge(m_world, automerge);