Turned on snapping by default + fixed opening scene from filebrowser

This commit is contained in:
Antoine Pilote
2024-08-27 22:54:28 -04:00
parent 946cf31340
commit c01d6e960c
2 changed files with 3 additions and 3 deletions

View File

@@ -536,13 +536,13 @@ namespace Nuake
{
Ref<Scene> 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);
}