Function ecs_lookup_path_w_sep

Synopsis

#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_lookup_path_w_sep(const ecs_world_t *world, ecs_entity_t parent, const char *path, const char *sep, const char *prefix, bool recursive)

Description

Lookup an entity from a path. Lookup an entity from a provided path, relative to the provided parent. The operation will use the provided separator to tokenize the path expression. If the provided path contains the prefix, the search will start from the root.

If the entity is not found in the provided parent, the operation will continue to search in the parent of the parent, until the root is reached. If the entity is still not found, the lookup will search in the flecs.core scope. If the entity is not found there either, the function returns 0.

Parameters

world - The world.

parent - The entity from which to resolve the path.

path - The path to resolve.

sep - The path separator.

prefix - The path prefix.

recursive - Recursively traverse up the tree until entity is found.

Returns
The entity if found, else 0.

Mentioned in

Source

Line 2105 in include/flecs.h.