Function ecs_get_path_w_sep

Synopsis

#include <include/flecs.h>

FLECS_API char * ecs_get_path_w_sep(const ecs_world_t *world, ecs_entity_t parent, ecs_entity_t child, ecs_entity_t component, const char *sep, const char *prefix)

Description

Get a path identifier for an entity. This operation creates a path that contains the names of the entities from the specified parent to the provided entity, separated by the provided separator. If no parent is provided the path will be relative to the root. If a prefix is provided, the path will be prefixed by the prefix.

If the parent is equal to the provided child, the operation will return an empty string. If a nonzero component is provided, the path will be created by looking for parents with that component.

The returned path should be freed by the application.

Parameters

world - The world.

parent - The entity from which to create the path.

child - The entity to which to create the path.

component - The component of the parent.

Returns
The relative entity path.

Mentioned in

Source

Line 1917 in include/flecs.h.