|
|
@@ -121,6 +121,7 @@ class basic_registry {
|
|
|
template<typename... Args>
|
|
|
decltype(auto) replace(basic_registry ®istry, const Entity entt, Args &&... args) {
|
|
|
if constexpr(std::is_empty_v<Component>) {
|
|
|
+ assert((storage<Entity, Component>::has(entt)));
|
|
|
on_replace.publish(registry, entt, Component{});
|
|
|
return Component{std::forward<Args>(args)...};
|
|
|
} else {
|