diff --git a/src/engine/entity.cpp b/src/engine/entity.cpp index d776d1c028a..21de4c539ae 100644 --- a/src/engine/entity.cpp +++ b/src/engine/entity.cpp @@ -192,6 +192,12 @@ Entity::hasComponent( } +EntityId +Entity::id() const { + return m_impl->m_id; +} + + void Entity::removeComponent( Component::TypeId typeId diff --git a/src/engine/entity.h b/src/engine/entity.h index 34724b2a680..cc67ccf97e8 100644 --- a/src/engine/entity.h +++ b/src/engine/entity.h @@ -247,6 +247,12 @@ class Entity { const std::string& typeName ); + /** + * @brief The entity's id + */ + EntityId + id() const; + /** * @brief Removes a component by type id *