Function ecs_trigger_init

Synopsis

#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_trigger_init(ecs_world_t *world, const ecs_trigger_desc_t *desc)

Description

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.

Parameters

world - The world.

decs - The trigger creation parameters.

Mentioned in

Source

Line 2796 in include/flecs.h.