Function ecs_iter_get_var


#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_iter_get_var(ecs_iter_t *it, int32_t var_id)


Get value of iterator variable as entity. A variable can be interpreted as entity if it is set to an entity, or if it is set to a table range with count 1.

This operation can only be invoked on valid iterators. The variable index must be smaller than the total number of variables provided by the iterator (as set in ecs_iter_t::variable_count).


it - The iterator.

var_id - The variable index.


Line 3808 in include/flecs.h.