Function ecs_set_hooks_id

Synopsis

#include <include/flecs.h>

FLECS_API void ecs_set_hooks_id(ecs_world_t *world, ecs_entity_t id, const ecs_type_hooks_t *hooks)

Description

Register hooks for component. Hooks allow for the execution of user code when components are constructed, copied, moved, destructed, added, removed or set. Hooks can be assigned as as long as a component has not yet been used (added to an entity).

The hooks that are currently set can be accessed with ecs_get_type_info.

Parameters

world - The world.

id - The component id for which to register the actions

hooks - Type that contains the component actions.

Source

Line 1300 in include/flecs.h.