feat(modules): 添加module.json配置

This commit is contained in:
yhh
2025-12-03 16:20:48 +08:00
parent e1d494b415
commit 37ab494e4a
26 changed files with 2356 additions and 147 deletions

View File

@@ -404,15 +404,23 @@ export const uiEditorModule = new UIEditorModule();
// 从 @esengine/ui 导入运行时模块
import { UIRuntimeModule } from '@esengine/ui';
import type { IPlugin, PluginDescriptor } from '@esengine/editor-core';
import type { IPlugin, ModuleManifest } from '@esengine/editor-core';
const descriptor: PluginDescriptor = {
const manifest: ModuleManifest = {
id: '@esengine/ui',
name: 'UI',
name: '@esengine/ui',
displayName: 'UI',
version: '1.0.0',
description: 'ECS-based UI system with editor support',
category: 'ui',
enabledByDefault: true
category: 'Rendering',
isCore: false,
defaultEnabled: true,
isEngineModule: true,
dependencies: ['engine-core'],
exports: {
components: ['UITransformComponent', 'UIRenderComponent', 'UITextComponent', 'UIButtonComponent'],
systems: ['UIRenderSystem', 'UILayoutSystem', 'UIInteractionSystem']
}
};
/**
@@ -420,7 +428,7 @@ const descriptor: PluginDescriptor = {
* Complete UI Plugin (runtime + editor)
*/
export const UIPlugin: IPlugin = {
descriptor,
manifest,
runtimeModule: new UIRuntimeModule(),
editorModule: uiEditorModule
};