pub unsafe extern "C" fn ecs_query_changed(
query: *mut ecs_query_t,
it: *const ecs_iter_t,
) -> boolExpand description
Returns whether the query data changed since the last iteration. The operation will return true after:
- new entities have been matched with
- new tables have been matched/unmatched with
- matched entities were deleted
- matched components were changed
The operation will not return true after a write-only (EcsOut) or filter (EcsInOutNone) term has changed, when a term is not matched with the current table (This subject) or for tag terms.
The changed state of a table is reset after it is iterated. If a iterator was not iterated until completion, tables may still be marked as changed.
If no iterator is provided the operation will return the changed state of the all matched tables of the query.
If an iterator is provided, the operation will return the changed state of the currently returned iterator result. The following preconditions must be met before using an iterator with change detection:
- The iterator is a query iterator (created with ecs_query_iter)
- The iterator must be valid (ecs_query_next must have returned true)
- The iterator must be instanced
@param query The query (optional if ‘it’ is provided). @param it The iterator result to test (optional if ‘query’ is provided). @return true if entities changed, otherwise false.