add commandline to load scene file

This commit is contained in:
2025-07-09 17:44:50 +08:00
parent 77f3945ae9
commit b1afcc4166

View File

@ -51,6 +51,14 @@ namespace Hazel
m_SceneHierachyPanel.SetContext(m_ActiveScene); m_SceneHierachyPanel.SetContext(m_ActiveScene);
m_GizmoType = ImGuizmo::OPERATION::TRANSLATE; m_GizmoType = ImGuizmo::OPERATION::TRANSLATE;
auto commandLineArgs = Application::Get().GetSpecification().commandLineArgs;
if (commandLineArgs.count > 1)
{
auto scenePath = commandLineArgs.args[1];
SceneSerializer sceneSerializer(m_ActiveScene);
sceneSerializer.Deserialize(scenePath);
}
} }