diff --git a/Editor/src/Windows/EditorInterface.h b/Editor/src/Windows/EditorInterface.h index 944e0111..22eeecf1 100644 --- a/Editor/src/Windows/EditorInterface.h +++ b/Editor/src/Windows/EditorInterface.h @@ -51,7 +51,7 @@ namespace Nuake ImGuizmo::OPERATION CurrentOperation = ImGuizmo::TRANSLATE; ImGuizmo::MODE CurrentMode = ImGuizmo::WORLD; - bool UseSnapping = false; + bool UseSnapping = true; Vector3 CurrentSnapping = { 0.0f, 0.0f, 0.0f }; Ref m_SelectedMaterial; Ref m_CurrentDirectory; diff --git a/Editor/src/Windows/FileSystemUI.cpp b/Editor/src/Windows/FileSystemUI.cpp index 18b85226..7dd4a1d9 100644 --- a/Editor/src/Windows/FileSystemUI.cpp +++ b/Editor/src/Windows/FileSystemUI.cpp @@ -536,13 +536,13 @@ namespace Nuake { Ref scene = Scene::New(); const std::string projectPath = file->GetAbsolutePath(); - if (!scene->Deserialize(FileSystem::ReadFile(projectPath, true))) + if (!scene->Deserialize(json::parse(FileSystem::ReadFile(projectPath, true)))) { Logger::Log("Failed loading scene: " + projectPath,"editor", CRITICAL); + ImGui::PopFont(); return; } - FileSystem::SetRootDirectory(projectPath + "/"); scene->Path = FileSystem::AbsoluteToRelative(projectPath); Engine::LoadScene(scene); }