#include <include/flecs.h> FLECS_API ecs_entity_t ecs_trigger_init(ecs_world_t *world, const ecs_trigger_desc_t *desc)
Create trigger. Triggers notify the application when certain events happen such as adding or removing components.
An application can change the trigger callback or context pointer by calling ecs_trigger_init for an existing trigger entity, by setting the ecs_trigger_desc_t::entity.entity field in combination with callback and/or ctx.
See the documentation for ecs_trigger_desc_t for more details.
world- The world.
decs- The trigger creation parameters.
- Quickstart / Trigger