Function ecs_id_is_valid

Synopsis

#include <include/flecs.h>

FLECS_API bool ecs_id_is_valid(const ecs_world_t *world, ecs_id_t id)

Description

Utility to check if id is valid. A valid id is an id that can be added to an entity. Invalid ids are:

  • ids that contain wildcards
  • ids that contain invalid entities
  • ids that are 0 or contain 0 entities

Note that the same rules apply to removing from an entity, with the exception of wildcards.

Parameters

world - The world.

id - The id.

Returns
True if the id is valid.

Source

Line 3062 in include/flecs.h.