Refactor Mesh serialization and model system.

This commit is contained in:
antopilo
2022-06-28 19:56:16 -04:00
parent 6b827e9db7
commit 407ff89df7
21 changed files with 612 additions and 287 deletions

View File

@@ -199,14 +199,17 @@ namespace Nuake
auto project = Project::New();
auto projectFileData = FileSystem::ReadFile(projectPath, true);
if (!project->Deserialize(projectFileData))
try {
project->Deserialize(projectFileData);
project->FullPath = projectPath;
Engine::LoadProject(project);
}
catch (std::exception exception)
{
Logger::Log("Error loading project: " + projectPath, CRITICAL);
return;
Logger::Log(exception.what());
}
project->FullPath = projectPath;
Engine::LoadProject(project);
Engine::GetCurrentWindow()->SetTitle("Nuake Engine - Editing " + project->Name);
}