Function ecs_iter_get_var

Synopsis

#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_iter_get_var(ecs_iter_t *it, int32_t var_id)

Description

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).

Parameters

it - The iterator.

var_id - The variable index.

Source

Line 3808 in include/flecs.h.