Skip to content

Commit

Permalink
Fix level switching not unloading old entities
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksigron committed Oct 15, 2024
1 parent 4c21a08 commit 16fe662
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor/src/App/EditorCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ void EditorCore::OpenLevel(Uid levelAssetUid)

if (filesystem->ReadText(asset->GetVirtualPath().GetCStr(), sceneConfig))
{
editorContext.world->ClearAllEntities();

editorContext.world->GetSerializer()->DeserializeFromString(
MutableStringView(sceneConfig.GetData(), sceneConfig.GetLength()));

Expand Down

0 comments on commit 16fe662

Please sign in to comment.