We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e460dc7 commit 67c78d2Copy full SHA for 67c78d2
dart8/io/serializer.hpp
@@ -227,7 +227,12 @@ class TypedComponentSerializer : public ComponentSerializer
227
{
228
ComponentT component;
229
loadComponent(in, component);
230
- registry.emplace<ComponentT>(entity, std::move(component));
+ if constexpr (std::is_empty_v<ComponentT>) {
231
+ // Tag components in EnTT must be emplaced without constructor args
232
+ registry.emplace<ComponentT>(entity);
233
+ } else {
234
+ registry.emplace<ComponentT>(entity, std::move(component));
235
+ }
236
}
237
238
bool hasComponent(
0 commit comments