Function ensure

Synopsis

#include <include/flecs/addons/cpp/world.hpp>

flecs::entity ensure(flecs::entity_t e) const

Description

Ensures that entity with provided generation is alive. Ths operation will fail if an entity exists with the same id and a different, non-zero generation.

See
ecs_ensure

Source

Lines 146-149 in include/flecs/addons/cpp/impl/world.hpp. Line 821 in include/flecs/addons/cpp/world.hpp.

inline flecs::entity world::ensure(flecs::entity_t e) const {
    ecs_ensure(m_world, e);
    return flecs::entity(m_world, e);
}