111
This commit is contained in:
@@ -21,7 +21,7 @@ namespace Stary.Evo.Editor
|
||||
private Action _onBuildApkAction;
|
||||
private Action _onBuildApkUpdateAction;
|
||||
|
||||
[Button("打包", ButtonSizes.Large)]
|
||||
[Button("加载打包配置", ButtonSizes.Large)]
|
||||
private void BuildApk()
|
||||
{
|
||||
this._onBuildApkAction?.Invoke();
|
||||
|
||||
@@ -141,27 +141,27 @@ namespace Stary.Evo.Editor
|
||||
}
|
||||
|
||||
// 配置构建选项
|
||||
BuildPlayerOptions buildOptions = new BuildPlayerOptions
|
||||
{
|
||||
scenes = scenelist,
|
||||
locationPathName = $"Builds/Android/{PlayerSettings.productName}.apk",
|
||||
target = BuildTarget.Android,
|
||||
options = BuildOptions.None
|
||||
};
|
||||
|
||||
// 执行打包
|
||||
var report = BuildPipeline.BuildPlayer(buildOptions);
|
||||
|
||||
BuildSummary summary = report.summary;
|
||||
if (summary.result == BuildResult.Succeeded)
|
||||
{
|
||||
Debug.Log("Build succeeded: " + summary.totalSize + " bytes");
|
||||
}
|
||||
|
||||
if (summary.result == BuildResult.Failed)
|
||||
{
|
||||
Debug.LogError("Build failed");
|
||||
}
|
||||
// BuildPlayerOptions buildOptions = new BuildPlayerOptions
|
||||
// {
|
||||
// scenes = scenelist,
|
||||
// locationPathName = $"Builds/Android/{PlayerSettings.productName}.apk",
|
||||
// target = BuildTarget.Android,
|
||||
// options = BuildOptions.None
|
||||
// };
|
||||
//
|
||||
// // 执行打包
|
||||
// var report = BuildPipeline.BuildPlayer(buildOptions);
|
||||
//
|
||||
// BuildSummary summary = report.summary;
|
||||
// if (summary.result == BuildResult.Succeeded)
|
||||
// {
|
||||
// Debug.Log("Build succeeded: " + summary.totalSize + " bytes");
|
||||
// }
|
||||
//
|
||||
// if (summary.result == BuildResult.Failed)
|
||||
// {
|
||||
// Debug.LogError("Build failed");
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace Stary.Evo
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"UnityEvo:从远程加载资源包,初始化失败:{e}");
|
||||
Debug.LogWarning($"UnityEvo:从远程加载资源包,初始化失败:{e}");
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -189,7 +189,7 @@ namespace Stary.Evo
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError($"UnityEvo:从本地缓存中资源包,初始化失败:{e}");
|
||||
Debug.LogWarning($"UnityEvo:从本地缓存中资源包,初始化失败:{e}");
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Stary.Evo
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"UnityEvo:从本地缓存中加载资源包,初始化获取版本号失败!");
|
||||
Debug.LogWarning($"UnityEvo:从本地缓存中加载资源包,初始化获取版本号失败!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -255,7 +255,7 @@ namespace Stary.Evo
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"UnityEvo:StreamingAssets下的{packageDomainName}包不存在");
|
||||
Debug.LogWarning($"UnityEvo:StreamingAssets下的{packageDomainName}包不存在");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -296,14 +296,14 @@ namespace Stary.Evo
|
||||
}
|
||||
else //版本一致,加载缓存资源
|
||||
{
|
||||
Debug.Log($"UnityEvo:当前版本{oldVersion}资源版本一致,自动跳过更新...");
|
||||
Debug.LogWarning($"UnityEvo:当前版本{oldVersion}资源版本一致,自动跳过更新...");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"UnityEvo:获取资源版本失败: 【{resDmainMessageEntity.message}】");
|
||||
Debug.LogWarning($"UnityEvo:获取资源版本失败: 【{resDmainMessageEntity.message}】");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "com.staryevo.tools",
|
||||
"version": "1.3.13",
|
||||
"version": "1.3.14",
|
||||
"displayName": "00.StaryEvo.Tools",
|
||||
"description": "This is an Framework package(后台服务器版本,端口9527)",
|
||||
"unity": "2021.3",
|
||||
|
||||
Reference in New Issue
Block a user