refactor(editor): isolate engine service boundaries

This commit is contained in:
2026-04-29 03:19:46 +08:00
parent ef11651ec2
commit 313a571e43
60 changed files with 3804 additions and 2611 deletions

View File

@@ -3,6 +3,7 @@
#include "Panels/EditorPanelServices.h"
#include "UtilityWindows/EditorUtilityWindowRuntime.h"
#include "State/EditorColorPickerToolState.h"
#include "Inspector/InspectorFieldValueApplier.h"
#include <XCEditor/Collections/UIEditorScrollView.h>
#include <XCEditor/Fields/UIEditorFieldStyle.h>
#include <XCEditor/Foundation/UIEditorPanelInputFilter.h>
@@ -702,27 +703,11 @@ bool InspectorPanel::ApplyChangedField(std::string_view fieldId) {
return false;
}
const IInspectorComponentEditor* editor =
InspectorComponentEditorRegistry::Get().FindEditor(binding->typeName);
if (editor == nullptr) {
return false;
}
InspectorComponentEditorContext context = {};
context.gameObject = &m_subject.sceneObject.object;
context.componentId = binding->componentId;
context.typeName = binding->typeName;
context.displayName = binding->displayName;
context.removable = binding->removable;
for (const EditorSceneComponentDescriptor& descriptor :
m_sceneRuntime->GetSelectedComponents()) {
if (descriptor.componentId == binding->componentId) {
context.component = descriptor.view.get();
break;
}
}
return editor->ApplyFieldValue(*m_sceneRuntime, context, field);
return ApplyInspectorComponentBoundFieldValue(
*m_sceneRuntime,
m_subject.sceneObject,
*binding,
field);
}
void InspectorPanel::Update(