simple debug info
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user