Feature/tilemap editor (#237)

* feat: 添加 Tilemap 编辑器插件和组件生命周期支持

* feat(editor-core): 添加声明式插件注册 API

* feat(editor-core): 改进tiledmap结构合并tileset进tiledmapeditor

* feat: 添加 editor-runtime SDK 和插件系统改进

* fix(ci): 修复SceneResourceManager里变量未使用问题
This commit is contained in:
YHH
2025-11-25 22:23:19 +08:00
committed by GitHub
parent 551ca7805d
commit 3fb6f919f8
166 changed files with 54691 additions and 8674 deletions

View File

@@ -36,10 +36,10 @@ pub async fn build_plugin(plugin_folder: String, app: AppHandle) -> Result<Strin
.map_err(|e| format!("Failed to create .build-cache directory: {}", e))?;
}
let npm_command = if cfg!(target_os = "windows") {
"npm.cmd"
let pnpm_command = if cfg!(target_os = "windows") {
"pnpm.cmd"
} else {
"npm"
"pnpm"
};
// Step 1: Install dependencies
@@ -52,15 +52,15 @@ pub async fn build_plugin(plugin_folder: String, app: AppHandle) -> Result<Strin
)
.ok();
let install_output = Command::new(npm_command)
let install_output = Command::new(&pnpm_command)
.args(["install"])
.current_dir(&plugin_folder)
.output()
.map_err(|e| format!("Failed to run npm install: {}", e))?;
.map_err(|e| format!("Failed to run pnpm install: {}", e))?;
if !install_output.status.success() {
return Err(format!(
"npm install failed: {}",
"pnpm install failed: {}",
String::from_utf8_lossy(&install_output.stderr)
));
}
@@ -75,15 +75,15 @@ pub async fn build_plugin(plugin_folder: String, app: AppHandle) -> Result<Strin
)
.ok();
let build_output = Command::new(npm_command)
let build_output = Command::new(&pnpm_command)
.args(["run", "build"])
.current_dir(&plugin_folder)
.output()
.map_err(|e| format!("Failed to run npm run build: {}", e))?;
.map_err(|e| format!("Failed to run pnpm run build: {}", e))?;
if !build_output.status.success() {
return Err(format!(
"npm run build failed: {}",
"pnpm run build failed: {}",
String::from_utf8_lossy(&build_output.stderr)
));
}

View File

@@ -101,6 +101,10 @@ fn handle_project_protocol(
let uri = request.uri();
let path = uri.path();
// Debug logging
println!("[project://] Full URI: {}", uri);
println!("[project://] Path: {}", path);
let file_path = {
let paths = match project_paths.lock() {
Ok(p) => p,

View File

@@ -3,8 +3,7 @@
"version": "1.0.8",
"identifier": "com.esengine.editor",
"build": {
"beforeDevCommand": "npm run dev",
"devUrl": "http://localhost:5173",
"beforeDevCommand": "npm run build:watch",
"beforeBuildCommand": "npm run build",
"frontendDist": "../dist"
},
@@ -67,7 +66,7 @@
}
],
"security": {
"csp": null,
"csp": "default-src 'self' 'unsafe-inline' 'unsafe-eval' tauri: project: asset: https: http: data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' tauri: project: asset: https: http: blob:; style-src 'self' 'unsafe-inline' tauri: https: http:; img-src 'self' tauri: project: asset: https: http: data: blob:; connect-src 'self' tauri: project: asset: https: http: ws: wss:",
"assetProtocol": {
"enable": true,
"scope": {