diff --git a/Sandbox/src/Editor/Panels/SceneHierachyPanel.cpp b/Sandbox/src/Editor/Panels/SceneHierachyPanel.cpp index 8729879..136e4da 100644 --- a/Sandbox/src/Editor/Panels/SceneHierachyPanel.cpp +++ b/Sandbox/src/Editor/Panels/SceneHierachyPanel.cpp @@ -44,7 +44,14 @@ namespace Hazel if (ImGui::BeginPopupContextWindow(0, ImGuiPopupFlags_MouseButtonRight | ImGuiPopupFlags_NoOpenOverItems)) { if (ImGui::MenuItem("Create Empty Entity")) - m_Context->CreateEntity("Empty Entity"); + { + m_SelectionContext = m_Context->CreateEntity("Empty Entity"); + } + else if (ImGui::MenuItem("Create Camera")) + { + m_SelectionContext = m_Context->CreateEntity("Camera"); + m_SelectionContext.AddComponent(); + } ImGui::EndPopup(); }