From 7b53e7baaa9d3270d96d368cd7241ac34c3c23b2 Mon Sep 17 00:00:00 2001 From: Antoine Pilote Date: Mon, 1 Apr 2024 12:54:10 -0400 Subject: [PATCH] Fixed scene loading through menu bar --- Editor/src/Windows/EditorInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Editor/src/Windows/EditorInterface.cpp b/Editor/src/Windows/EditorInterface.cpp index 0c535e4e..c9e93a00 100644 --- a/Editor/src/Windows/EditorInterface.cpp +++ b/Editor/src/Windows/EditorInterface.cpp @@ -1964,7 +1964,8 @@ namespace Nuake { std::string projectPath = FileDialog::OpenFile(".scene"); Ref scene = Scene::New(); - if (!scene->Deserialize(FileSystem::ReadFile(projectPath, true))) + const std::string& fileContent = FileSystem::ReadFile(projectPath, true); + if (!scene->Deserialize(json::parse(fileContent))) { Logger::Log("Error failed loading scene: " + projectPath, "editor", CRITICAL); return;