T::ComponentType*, Error> temp = getComponentForEntity<typename T::ComponentType>(entity);
if (temp.has_value())
T{}(*temp.value());
}
template<std::derived_from<Component> T>
std::unordered_map<Entity, T>& ECS::getComponentMap()
{
static std::unordered_map<Entity, T> instance{};
return instance;
}
}
#endif
https://redd.it/1nyjayx
@r_cpp
Post #23986
15