fix deprecated call to registry().each()
This commit is contained in:
parent
620e4c0f8a
commit
42926a0c9b
|
|
@ -44,8 +44,10 @@ namespace NzEditor
|
||||||
if (!m_currentLevel.IsValid())
|
if (!m_currentLevel.IsValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_currentWorld->GetRegistry().each([&](const entt::entity entity) {
|
auto& registry = m_currentLevel.GetEnttWorld()->GetRegistry();
|
||||||
entt::handle handle(m_currentWorld->GetRegistry(), entity);
|
for(auto&& entity : registry.storage<entt::entity>().each())
|
||||||
|
{
|
||||||
|
entt::handle handle(registry, std::get<entt::entity>(entity));
|
||||||
Nz::NodeComponent* component = handle.try_get<Nz::NodeComponent>();
|
Nz::NodeComponent* component = handle.try_get<Nz::NodeComponent>();
|
||||||
if (component != nullptr)
|
if (component != nullptr)
|
||||||
{
|
{
|
||||||
|
|
@ -53,6 +55,6 @@ namespace NzEditor
|
||||||
if (component->GetParent() == nullptr)
|
if (component->GetParent() == nullptr)
|
||||||
m_rootNodes.push_back(component);
|
m_rootNodes.push_back(component);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue