From f99ae1246ae662d2dd58c30346ed8d0f5f2c3217 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Wed, 9 Aug 2023 00:30:50 -0400 Subject: [PATCH] Fixed editor prefab --- Editor/src/Windows/EditorInterface.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 1de50688..777f258b 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -1091,10 +1091,7 @@ namespace Nuake { char* file = (char*)payload->Data; std::string fullPath = std::string(file, 256); std::string relPath = FileSystem::AbsoluteToRelative(fullPath); - - Entity newEntity = Engine::GetCurrentScene()->CreateEntity("New prefab Entity"); - PrefabComponent& prefabComponent = newEntity.AddComponent(); - prefabComponent.PrefabInstance = Prefab::New(relPath); + Prefab::New(relPath); } ImGui::EndDragDropTarget(); }