diff --git a/Sandbox/src/Editor/EditorLayer.cpp b/Sandbox/src/Editor/EditorLayer.cpp index be51381..1892e28 100644 --- a/Sandbox/src/Editor/EditorLayer.cpp +++ b/Sandbox/src/Editor/EditorLayer.cpp @@ -447,10 +447,16 @@ namespace Hazel void EditorLayer::SaveSceneAs() const { std::string filepath = FileDiaglogs::SaveFile("Hazel Scene (*.scene,*.yaml)\0*.scene;*.yaml\0*\0*.*\0\0"); - if (!filepath.empty()) + HZ_CORE_INFO("Saving scene to: {}", filepath); + if (filepath.empty()) { - SerializeScene(m_ActiveScene, filepath); + HZ_CORE_WARN("filepath is empty! do not save Scene!"); } + else + { + SerializeScene(m_ActiveScene, filepath); + HZ_CORE_INFO("scene saved"); + } } void EditorLayer::OpenScene() @@ -493,7 +499,12 @@ namespace Hazel { if (!m_EditorScenePath.empty()) { + HZ_CORE_INFO("Saving scene: {}", m_EditorScenePath.string()); SerializeScene(m_ActiveScene, m_EditorScenePath); + HZ_CORE_INFO("scene saved"); + }else + { + SaveSceneAs(); } }