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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user