diff --git a/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs b/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs index db526e4..58e9300 100644 --- a/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs +++ b/Assets/00.StaryEvo/Editor/Build/BuildApkWindow.cs @@ -23,9 +23,9 @@ public class BuildApkWindow : OdinEditorWindow protected override void Initialize() { base.Initialize(); - buildApkLocalEntity = new BuildApkEntity(BuildAndroid, BuildAndroid); - buildApkServerEntity = new BuildApkEntity(BuildAndroid, BuildAndroid); - buildApkWatermarkEntity = new BuildApkEntity(BuildAndroid, BuildAndroid); + buildApkLocalEntity = new BuildApkEntity(() => { BuildAndroid(false); }, null); + buildApkServerEntity = new BuildApkEntity(null, null); + buildApkWatermarkEntity = new BuildApkEntity(() => { BuildAndroid(true); }, null); } [EnumToggleButtons, HideLabel] public DeviceType deviceType; @@ -77,7 +77,7 @@ public class BuildApkWindow : OdinEditorWindow [BoxGroup("Build(水印包)", centerLabel: true, order: 4), HideLabel] public BuildApkEntity buildApkWatermarkEntity; - public void BuildAndroid() + public void BuildAndroid(bool isWatermark) { HotfixMainResDomain hotfixMainResDomain = Resources.Load("HotfixMainResDomain"); if (hotfixMainResDomain == null) @@ -90,15 +90,27 @@ public class BuildApkWindow : OdinEditorWindow PlayerSettings.productName = hotfixMainResDomain.projectInfo.projectName; PlayerSettings.applicationIdentifier = hotfixMainResDomain.projectInfo.projectPackageName; + string[] scenelist = default; + if (isWatermark) + { + scenelist = new[] + { + hotfixMainResDomain.projectInfo.loadingScenePath, + $"Assets/Main/main_{deviceType.ToString()}.unity" + }; + } + else + { + scenelist = new[] + { + $"Assets/Main/main_{deviceType.ToString()}.unity" + }; + } // 配置构建选项 BuildPlayerOptions buildOptions = new BuildPlayerOptions { - scenes = new[] - { - hotfixMainResDomain.projectInfo.loadingScenePath, - $"Assets/Main/main_{deviceType.ToString()}.unity" - }, + scenes = scenelist, locationPathName = $"Builds/Android/{PlayerSettings.applicationIdentifier}.apk", target = BuildTarget.Android, options = BuildOptions.None diff --git a/Assets/00.StaryEvo/package.json b/Assets/00.StaryEvo/package.json index 4823ace..f4f8499 100644 --- a/Assets/00.StaryEvo/package.json +++ b/Assets/00.StaryEvo/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.main", - "version": "1.3.12", + "version": "1.3.13", "displayName": "00.StaryEvo", "description": "This is an Framework package(后台服务器版本,端口9527)", "unity": "2021.3", diff --git a/Assets/05.TableTextConversion/RunTime/Use/ReadDumpInformation.cs b/Assets/05.TableTextConversion/RunTime/Use/ReadDumpInformation.cs index ed9e942..f5d487a 100644 --- a/Assets/05.TableTextConversion/RunTime/Use/ReadDumpInformation.cs +++ b/Assets/05.TableTextConversion/RunTime/Use/ReadDumpInformation.cs @@ -1,13 +1,26 @@ using System.Threading.Tasks; using UnityEngine; +#if HotUpdate using YooAsset; - +#endif namespace Stary.Evo.TableTextConversion { public static class ReadDumpInformation { public static async Task Read() where T : ScriptableObject, ITableData { +#if NotUpdate + var conf = Resources.Load(typeof(T).Name); + if (conf != null) + { + return conf; + } + else + { + Debug.LogError("UnityEvo:" + "配置文件:" + typeof(T).Name + "加载失败!!!"); + return null; + } +#elif HotUpdate var conf = YooAssets.LoadAssetAsync($"Config_{typeof(T).Name}"); await conf.Task; if (conf.Status == EOperationStatus.Succeed) @@ -19,6 +32,7 @@ namespace Stary.Evo.TableTextConversion Debug.LogError("UnityEvo:" + "配置文件:" + typeof(T).Name + "加载失败!!!"); return null; } +#endif } #if UNITY_EDITOR @@ -26,12 +40,12 @@ namespace Stary.Evo.TableTextConversion { // 同步加载并直接返回结果 var conf = Resources.Load(typeof(T).Name); - + if (conf != null) { return conf; } - + Debug.LogError($"UnityEvo:配置文件同步加载失败:{typeof(T).Name}"); return null; } diff --git a/Assets/05.TableTextConversion/package.json b/Assets/05.TableTextConversion/package.json index 5640300..fecd88c 100644 --- a/Assets/05.TableTextConversion/package.json +++ b/Assets/05.TableTextConversion/package.json @@ -1,6 +1,6 @@ { "name": "com.staryevo.tabletextconversion", - "version": "1.1.1", + "version": "1.1.2", "displayName": "05.TableTextConversion", "description": "表格转化工具", "unity": "2021.3",