refactor(editor): isolate scene backend boundary

This commit is contained in:
2026-04-28 16:32:25 +08:00
parent 6c4663ed21
commit 23aab98a09
15 changed files with 481 additions and 253 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include "Scene/EditorSceneBridge.h"
#include "Scene/EditorSceneBackend.h"
#include "Scene/SceneViewportCameraController.h"
#include "Scene/SceneToolState.h"
#include "State/EditorSelectionService.h"
@@ -55,6 +55,7 @@ public:
EditorSceneRuntime& operator=(EditorSceneRuntime&&) = delete;
void Reset();
void SetBackend(std::unique_ptr<EditorSceneBackend> backend);
bool Initialize(const std::filesystem::path& projectRoot);
void BindSelectionService(EditorSelectionService* selectionService);
@@ -175,6 +176,7 @@ private:
void IncrementInspectorRevision();
std::filesystem::path m_projectRoot = {};
std::unique_ptr<EditorSceneBackend> m_backend = {};
EditorStartupSceneResult m_startupSceneResult = {};
EditorSelectionService m_ownedSelectionService = {};
EditorSelectionService* m_selectionService = &m_ownedSelectionService;