34 void Init(GLFWwindow* window,
Scene* scene);
44 return m_SelectedEntity;
53 m_CameraPreviewTextureID = textureID;
85 m_GraphicsSettings = settings;
91 return m_GraphicsSettings;
95 const glm::mat4& view,
96 const glm::mat4& projection);
99 std::shared_ptr<Mesh> mesh,
100 std::shared_ptr<Material> material);
107 return m_ViewportHovered;
112 return m_ViewportFocused;
117 void DrawPlayToolbar();
118 void DrawHierarchy();
119 void DrawEntityNode(
Entity entity);
120 void DrawInspector();
123 void DrawProjectPanel();
124 void DrawGraphicsSettings();
125 void DrawRendererProfiler();
126 void DrawAIDebugger();
127 void DrawComponentTools();
129 std::string OpenInspectorAudioFileDialog();
130 std::string OpenInspectorTextureFileDialog();
132 void LogInspectorMessage(
133 const std::string& message);
135 bool HierarchyMatchesFilter(
138 bool IsMultiSelected(
141 void ClearMultiSelection();
143 Entity CreateEmptyEntity();
144 Entity CreateCubeEntity();
147 const std::filesystem::path& modelPath);
149 void DeleteSelectedEntity();
150 void DuplicateSelectedEntity();
152 void PushUndoSnapshot(
153 std::unique_ptr<Scene> snapshot);
155 void CaptureUndoSnapshot();
159 void ClearRedoHistory();
162 Scene* m_Scene =
nullptr;
166 std::vector<std::uint32_t>
170 m_SelectedMaterialSlot = 0;
172 char m_HierarchySearch[128]{};
174 bool m_RenameSelectedRequested =
false;
175 using ComponentClipboard =
179 NativeScriptComponent,
181 BoxColliderComponent,
182 SphereColliderComponent,
183 CapsuleColliderComponent,
185 DirectionalLightComponent,
190 PerceptionComponent>;
193 m_ComponentClipboard;
195 std::shared_ptr<Mesh>
198 std::shared_ptr<Material>
199 m_DefaultCubeMaterial;
202 m_ViewportTextureID = 0;
205 m_CameraPreviewTextureID = 0;
207 float m_ViewportWidth = 1280.0f;
208 float m_ViewportHeight = 720.0f;
210 bool m_ViewportHovered =
false;
211 bool m_ViewportFocused =
false;
213 glm::mat4 m_EditorView{ 1.0f };
214 glm::mat4 m_EditorProjection{ 1.0f };
216 int m_GizmoOperation = 0;
218 ProjectPanel m_ProjectPanel;
224 bool m_IsPlaying =
false;
225 bool m_IsPaused =
false;
227 bool m_PlayRequested =
false;
228 bool m_PauseRequested =
false;
229 bool m_StopRequested =
false;
235 bool m_SaveSceneRequested =
false;
236 bool m_SaveSceneAsRequested =
false;
237 bool m_LoadSceneRequested =
false;
239 bool m_GraphicsTestSceneRequested =
false;
245 bool m_BakeNavMeshRequested =
false;
246 bool m_ClearNavMeshRequested =
false;
248 bool m_ShowNavMesh =
true;
254 bool m_ShowGraphicsSettings =
true;
255 bool m_ShowRendererProfiler =
true;
256 bool m_ShowAIDebugger =
true;
257 std::uint32_t m_AIDebugAgent = 0;
258 bool m_AIDebugOnlyActive =
false;
259 bool m_AIDebugShowLastSeenMarker =
false;
261 FramebufferSpecification
262 m_GraphicsSettings{};
268 static constexpr std::size_t
269 MaxHistoryEntries = 64;
271 std::vector<std::unique_ptr<Scene>>
274 std::vector<std::unique_ptr<Scene>>
277 std::unique_ptr<Scene>
278 m_TransformEditSnapshot;
280 std::unique_ptr<Scene>
281 m_ScriptFieldEditSnapshot;
283 bool m_GizmoWasUsing =
false;