simple debug info

This commit is contained in:
2025-07-09 17:48:31 +08:00
parent 71a5a994ff
commit 448c162705

View File

@ -447,9 +447,15 @@ 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())
{
HZ_CORE_WARN("filepath is empty! do not save Scene!");
}
else
{
SerializeScene(m_ActiveScene, filepath);
HZ_CORE_INFO("scene saved");
}
}
@ -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();
}
}