111
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Stary.Evo.Editor
|
|||||||
|
|
||||||
[Title("打包配置", titleAlignment: TitleAlignments.Centered)] [ToggleLeft] [LabelText("是否添加水印")]
|
[Title("打包配置", titleAlignment: TitleAlignments.Centered)] [ToggleLeft] [LabelText("是否添加水印")]
|
||||||
public bool isWatermark = false;
|
public bool isWatermark = false;
|
||||||
|
|
||||||
[ToggleLeft] [LabelText("构建完成后打开文件夹")] public bool openFolderOnComplete = true;
|
[ToggleLeft] [LabelText("构建完成后打开文件夹")] public bool openFolderOnComplete = true;
|
||||||
|
|
||||||
[BoxGroup("缓存管理", centerLabel: true)]
|
[BoxGroup("缓存管理", centerLabel: true)]
|
||||||
@@ -148,25 +148,26 @@ namespace Stary.Evo.Editor
|
|||||||
{
|
{
|
||||||
ConfigureWatermark();
|
ConfigureWatermark();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打包前检查
|
// 打包前检查
|
||||||
if (!PreBuildCheck())
|
if (!PreBuildCheck())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildStatus = "设置打包模式...";
|
buildStatus = "设置打包模式...";
|
||||||
Repaint();
|
Repaint();
|
||||||
ChangePlayerSchema.SetPlayerMode(pLayerMode);
|
ChangePlayerSchema.SetPlayerMode(pLayerMode);
|
||||||
|
|
||||||
buildStatus = "执行打包...";
|
buildStatus = "执行打包...";
|
||||||
Repaint();
|
Repaint();
|
||||||
// 配置构建选项
|
// 配置构建选项
|
||||||
BuildPlayerOptions buildOptions = ConfigureBuildOptions(sceneList, isWatermark);
|
BuildPlayerOptions buildOptions = ConfigureBuildOptions(sceneList, isWatermark);
|
||||||
|
|
||||||
// 执行打包
|
// 执行打包
|
||||||
var report = BuildPipeline.BuildPlayer(buildOptions);
|
var report = BuildPipeline.BuildPlayer(buildOptions);
|
||||||
_lastBuildReport = report;
|
_lastBuildReport = report;
|
||||||
|
|
||||||
// 处理打包结果
|
// 处理打包结果
|
||||||
HandleBuildResult(report, buildOptions.locationPathName);
|
HandleBuildResult(report, buildOptions.locationPathName);
|
||||||
}
|
}
|
||||||
@@ -251,7 +252,7 @@ namespace Stary.Evo.Editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return scenes.ToArray();
|
return scenes.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,7 +607,7 @@ namespace Stary.Evo.Editor
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 加载场景
|
// 加载场景
|
||||||
EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
|
Scene scene = EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
|
||||||
|
|
||||||
|
|
||||||
GameObject loadDllObj = GameObject.Find("LoadDll");
|
GameObject loadDllObj = GameObject.Find("LoadDll");
|
||||||
@@ -614,6 +615,12 @@ namespace Stary.Evo.Editor
|
|||||||
HybridClREntrance entrance = loadDllObj.GetComponent<HybridClREntrance>();
|
HybridClREntrance entrance = loadDllObj.GetComponent<HybridClREntrance>();
|
||||||
entrance.loadDomain = selectedPackageName;
|
entrance.loadDomain = selectedPackageName;
|
||||||
|
|
||||||
|
// 刷新AssetDatabase
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
// 保存场景
|
||||||
|
EditorSceneManager.SaveScene(scene);
|
||||||
|
// 重新加载场景以应用更改
|
||||||
|
EditorSceneManager.OpenScene(scenePath, OpenSceneMode.Single);
|
||||||
|
|
||||||
Debug.Log($"成功加载场景: {scenePath}");
|
Debug.Log($"成功加载场景: {scenePath}");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "com.staryevo.tools",
|
"name": "com.staryevo.tools",
|
||||||
"version": "1.3.19",
|
"version": "1.3.20",
|
||||||
"displayName": "00.StaryEvo.Tools",
|
"displayName": "00.StaryEvo.Tools",
|
||||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user