SpiecsEngine
 
Loading...
Searching...
No Matches

◆ DestroyEntity()

void Spices::World::DestroyEntity ( Entity & entity)

Destroy a entity from this world.

Parameters
[in]entityEntity.

Definition at line 31 of file World.cpp.

32 {
34
35 std::unique_lock<std::shared_mutex> lock(m_Mutex);
36
37 m_Registry.destroy(entity);
38 m_RootEntityMap.erase(entity.GetUUID());
39 }
#define SPICES_PROFILE_ZONE
entt::registry m_Registry
This variable handles all entity.
Definition World.h:250
std::shared_mutex m_Mutex
Mutex for world.
Definition World.h:245
std::unordered_map< UUID, entt::entity > m_RootEntityMap
This variable is a cache. @noto Not in use now.
Definition World.h:257