Fix editor selection system: SelectionManager ID types and Scene lookup

- SelectionManager now implements ISelectionManager interface with uint64_t IDs
- Remove SelectionManager/SceneManager circular dependency via EventBus
- Add Scene::FindByID() for proper ID-based entity lookup
- SceneManager::GetEntity() now uses FindByID instead of name-based Find
- Fix editor CMakeLists.txt XCEngine.lib path
- EventBus now thread-safe with shared_mutex
This commit is contained in:
2026-03-25 17:51:15 +08:00
parent 6612330347
commit b0d0576763
8 changed files with 77 additions and 39 deletions

View File

@@ -1,6 +1,8 @@
#pragma once
#include <string>
#include <memory>
#include <cassert>
namespace XCEngine {
namespace Editor {
@@ -23,8 +25,16 @@ public:
void SetOpen(bool open) { m_isOpen = open; }
void Toggle() { m_isOpen = !m_isOpen; }
void SetContext(IEditorContext* context) { m_context = context; }
IEditorContext* GetContext() const { return m_context; }
void SetContext(IEditorContext* context) {
assert(!m_context && "Context already set!");
m_context = context;
}
IEditorContext* GetContext() const {
return m_context;
}
bool HasContext() const { return m_context != nullptr; }
protected:
std::string m_name;