pub unsafe extern "C" fn ecs_is_valid(
world: *const ecs_world_t,
e: u64,
) -> boolExpand description
Test whether an entity is valid. Entities that are valid can be used with API functions. Using invalid entities with API operations will cause the function to panic.
An entity is valid if it is not 0 and if it is alive.
is_valid will return true for ids that don’t exist (alive or not alive). This allows for using ids that have never been created by ecs_new or similar. In this the function differs from ecs_is_alive, which will return false for entities that do not yet exist.
The operation will return false for an id that exists and is not alive, as using this id with an API operation would cause it to assert.
@param world The world. @param e The entity. @return True if the entity is valid, false if the entity is not valid.