Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit a1ec50c

Browse files
committed
Added SaveScene savior workaround
1 parent 964ceaa commit a1ec50c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

GATE_Engine/Application.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,17 @@ void Application::FinishUpdate() //TODO: Separate in functions (Save&Load, Frame
246246
{
247247
BROFILER_CATEGORY("App Finish Update", Profiler::Color::IndianRed);
248248

249+
// CHANGE/FIX: If .FBX meta is loaded instead of created, SaveScene file creation malfunctions, so until we find a fix a file for saving will always be created if there isn't one
250+
std::string scene_path;
251+
scene_path = ASSETS_FOLDER;
252+
scene_path += "scene_1.scene";
253+
bool scene_exists = App->file_system->Exists(scene_path.data());
254+
if (!scene_exists)
255+
{
256+
std::string scene_name = "scene_1";
257+
App->scene_intro->scene_ie.SaveScene(App->scene_intro->root, scene_name, FileType::SCENE);
258+
}
259+
249260
//Process Save&Load
250261
CheckFileEditRequests();
251262

GATE_Engine/ModuleSceneIntro.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool ModuleSceneIntro::Start()
6666
}
6767
else
6868
{
69-
//App->resources->ImportFile("Assets\\3D_Objects\\street\\Assignment2_street.FBX");
69+
App->resources->ImportFile("Assets\\3D_Objects\\street\\Assignment2_street.FBX");
7070
}
7171

7272
std::vector<const GameObject*> sceneObjects;

0 commit comments

Comments
 (0)