This commit is contained in:
zhangzheng
2026-03-18 18:24:05 +08:00
parent caf86d2e2d
commit cc10e4342e
2 changed files with 15 additions and 8 deletions

View File

@@ -38,7 +38,7 @@ namespace Stary.Evo.Editor
[Title("打包配置", titleAlignment: TitleAlignments.Centered)] [ToggleLeft] [LabelText("是否添加水印")]
public bool isWatermark = false;
[ToggleLeft] [LabelText("构建完成后打开文件夹")] public bool openFolderOnComplete = true;
[BoxGroup("缓存管理", centerLabel: true)]
@@ -148,25 +148,26 @@ namespace Stary.Evo.Editor
{
ConfigureWatermark();
}
// 打包前检查
if (!PreBuildCheck())
{
return;
}
buildStatus = "设置打包模式...";
Repaint();
ChangePlayerSchema.SetPlayerMode(pLayerMode);
buildStatus = "执行打包...";
Repaint();
// 配置构建选项
BuildPlayerOptions buildOptions = ConfigureBuildOptions(sceneList, isWatermark);
// 执行打包
var report = BuildPipeline.BuildPlayer(buildOptions);
_lastBuildReport = report;
// 处理打包结果
HandleBuildResult(report, buildOptions.locationPathName);
}
@@ -251,7 +252,7 @@ namespace Stary.Evo.Editor
}
}
return scenes.ToArray();
}
@@ -606,7 +607,7 @@ namespace Stary.Evo.Editor
try
{
// 加载场景
EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
Scene scene = EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
GameObject loadDllObj = GameObject.Find("LoadDll");
@@ -614,6 +615,12 @@ namespace Stary.Evo.Editor
HybridClREntrance entrance = loadDllObj.GetComponent<HybridClREntrance>();
entrance.loadDomain = selectedPackageName;
// 刷新AssetDatabase
AssetDatabase.Refresh();
// 保存场景
EditorSceneManager.SaveScene(scene);
// 重新加载场景以应用更改
EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
Debug.Log($"成功加载场景: {scenePath}");
}

View File

@@ -1,6 +1,6 @@
{
"name": "com.staryevo.tools",
"version": "1.3.19",
"version": "1.3.20",
"displayName": "00.StaryEvo.Tools",
"description": "This is an Framework package(后台服务器版本端口9527)",
"unity": "2021.3",