Function singleton

Synopsis

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

template <typename T>
flecs::entity singleton()

Description

Get singleton entity for type.

Mentioned in

Source

Lines 161-164 in include/flecs/cpp/impl/world.hpp. Line 503 in include/flecs/cpp/world.hpp.

template <typename T>
flecs::entity world::singleton() {
    return flecs::entity(m_world, _::cpp_type<T>::id(m_world));
}