Function ecs_set_lookup_path


#include <include/flecs.h>

FLECS_API ecs_entity_t * ecs_set_lookup_path(ecs_world_t *world, const ecs_entity_t *lookup_path)


Set search path for lookup operations. This operation accepts an array of entity ids that will be used as search scopes by lookup operations. The operation returns the current search path. It is good practice to restore the old search path.

The search path will be evaluated starting from the last element.

The default search path includes flecs.core. When a custom search path is provided it overwrites the existing search path. Operations that rely on looking up names from flecs.core without providing the namespace may fail if the custom search path does not include flecs.core (EcsFlecsCore).

The search path array is not copied into managed memory. The application must ensure that the provided array is valid for as long as it is used as the search path.

The provided array must be terminated with a 0 element. This enables an application to push/pop elements to an existing array without invoking the ecs_set_lookup_path operation again.


world - The world.

lookup_path - 0-terminated array with entity ids for the lookup path.

Current lookup path array.


Line 2864 in include/flecs.h.