Function changed

Synopsis

#include <include/flecs/addons/cpp/mixins/query/impl.hpp>

bool changed()

Description

Returns whether the query data changed since the last iteration. This operation must be invoked before obtaining the iterator, as this will reset the changed state. The operation will return true after:

  • new entities have been matched with
  • matched entities were deleted
  • matched components were changed
Returns
true if entities changed, otherwise false.

Source

Lines 47-49 in include/flecs/addons/cpp/mixins/query/impl.hpp.

bool changed() {
    return ecs_query_changed(m_query, 0);
}