Skip to content

Commit

Permalink
fix(ecs): Fix error with blueprint.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomsmiranda committed Feb 4, 2024
1 parent eea719c commit 181678b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/cubos/core/ecs/blueprint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ void Blueprint::instantiate(void* userData, Create create, Add add, Relate relat
std::unordered_map<Entity, Entity, EntityHash> thisToInstance{};
for (const auto& [entity, name] : mBimap)
{
Name nameComponent{name};
add(userData, entity, AnyValue::moveConstruct(reflect<Name>(), (void*)&nameComponent));
thisToInstance.emplace(entity, create(userData, name));
Name nameComponent{name};
add(userData, thisToInstance.at(entity), AnyValue::moveConstruct(reflect<Name>(), (void*)&nameComponent));
}

// Add copies of our components to their instantiated entities. Since the components themselves
Expand Down

0 comments on commit 181678b

Please sign in to comment.