SpiecsEngine
 
Loading...
Searching...
No Matches

◆ GetComponent()

template<typename T >
T & Spices::World::GetComponent ( entt::entity e)

Get Component owned by this entity.

Template Parameters
TWhich Component we will get.
Parameters
[in]eentt::entity.
Returns
Returns the specific Component.
Note
lock cause bug here.

Definition at line 353 of file World.h.

354 {
356
360 //std::shared_lock<std::shared_mutex> lock(m_Mutex);
361
362 return m_Registry.get<T>(e);
363 }
#define SPICES_PROFILE_ZONE
entt::registry m_Registry
This variable handles all entity.
Definition World.h:250