| | |
| | | return; |
| | | } |
| | | |
| | | bool success = BuildAllPackagesCore(incremental); |
| | | |
| | | if (!success) |
| | | { |
| | | EditorUtility.DisplayDialog("打包完成(有失败)", "部分 Package 打包失败,请检查 Console 日志。", "确定"); |
| | | } |
| | | else |
| | | { |
| | | bool toggleAB = EditorUtility.DisplayDialog("打包成功!", "所有 Package 打包完成!\n\n是否立即开启 AB 模式?", "开启AB模式", "暂不开启"); |
| | | if (toggleAB) |
| | | { |
| | | EditorPrefs.SetBool("YooAsset_UseAssetBundle", true); |
| | | Debug.Log("[YooAssetBuildTool] AB模式已开启,运行模式: OfflinePlayMode"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 资源打包核心逻辑(不含确认对话框),返回是否全部成功。 |
| | | /// </summary> |
| | | private static bool BuildAllPackagesCore(bool incremental) |
| | | { |
| | | // ---- 打包前:HybridCLR DLL(增量模式跳过)---- |
| | | if (!incremental) |
| | | { |
| | |
| | | EditorUtility.DisplayDialog("拷贝 DLL 失败", |
| | | "HybridCLR DLL 拷贝失败,请先执行 HybridCLR/Generate/All 生成 DLL 文件。\n详情请查看 Console 日志。", |
| | | "确定"); |
| | | return; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | |
| | | string summary = $"打包完成!成功: {successCount}, 失败: {failCount}, 耗时: {sw.Elapsed.TotalSeconds:F1}秒"; |
| | | Debug.Log($"[YooAssetBuildTool] ========== {summary} =========="); |
| | | |
| | | if (failCount > 0) |
| | | AssetDatabase.Refresh(); |
| | | return failCount == 0; |
| | | } |
| | | |
| | | // ==================================================================== |
| | | // 打包资源 / DLL + 构建平台包 |
| | | // ==================================================================== |
| | | |
| | | [MenuItem("YooAsset工具/打包所有资源+构建平台包", false, 210)] |
| | | private static void BuildAllPackagesAndPlayer() |
| | | { |
| | | string platform = EditorUserBuildSettings.activeBuildTarget.ToString(); |
| | | string outputPath = GetPlayerOutputPath(); |
| | | |
| | | if (!EditorUtility.DisplayDialog("确认操作", |
| | | $"将执行以下步骤:\n" + |
| | | $"1. 全量打包所有 Package (BuiltinBuildPipeline)\n" + |
| | | $"2. 构建 {platform} 平台包\n\n" + |
| | | $"输出路径: {outputPath}\n\n是否继续?", |
| | | "开始", "取消")) |
| | | { |
| | | EditorUtility.DisplayDialog("打包完成(有失败)", summary + "\n\n请检查 Console 日志中的错误信息。", "确定"); |
| | | return; |
| | | } |
| | | else |
| | | |
| | | // Step 1: 打包所有资源 |
| | | if (!BuildAllPackagesCore(incremental: false)) |
| | | { |
| | | bool toggleAB = EditorUtility.DisplayDialog("打包成功!", summary + "\n\n是否立即开启 AB 模式?", "开启AB模式", "暂不开启"); |
| | | if (toggleAB) |
| | | { |
| | | EditorPrefs.SetBool("YooAsset_UseAssetBundle", true); |
| | | Debug.Log("[YooAssetBuildTool] AB模式已开启,运行模式: OfflinePlayMode"); |
| | | } |
| | | EditorUtility.DisplayDialog("资源打包失败", "部分 Package 打包失败,已中止构建。\n请查看 Console 日志。", "确定"); |
| | | return; |
| | | } |
| | | |
| | | // Step 2: 构建平台包 |
| | | BuildPlayerForCurrentPlatform(outputPath); |
| | | } |
| | | |
| | | [MenuItem("YooAsset工具/打包DLL+构建平台包", false, 211)] |
| | | private static void BuildDllAndPlayer() |
| | | { |
| | | string platform = EditorUserBuildSettings.activeBuildTarget.ToString(); |
| | | string outputPath = GetPlayerOutputPath(); |
| | | |
| | | if (!EditorUtility.DisplayDialog("确认操作", |
| | | $"将执行以下步骤:\n" + |
| | | $"1. 拷贝 HybridCLR DLL 并打包 Dll Package\n" + |
| | | $"2. 构建 {platform} 平台包\n\n" + |
| | | $"输出路径: {outputPath}\n\n是否继续?", |
| | | "开始", "取消")) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | // Step 1: 拷贝 DLL 并打包 Dll Package |
| | | EditorUtility.DisplayProgressBar("YooAsset 打包中...", "正在拷贝 HybridCLR DLL...", 0.1f); |
| | | if (!CopyHybridCLRDlls()) |
| | | { |
| | | EditorUtility.ClearProgressBar(); |
| | | EditorUtility.DisplayDialog("拷贝 DLL 失败", |
| | | "HybridCLR DLL 拷贝失败,请先执行 HybridCLR/Generate/All。", "确定"); |
| | | return; |
| | | } |
| | | |
| | | string version = GenerateVersion(); |
| | | EditorUtility.DisplayProgressBar("YooAsset 打包中...", "正在打包 Dll...", 0.4f); |
| | | bool ok = BuildSinglePackage("Dll", version); |
| | | EditorUtility.ClearProgressBar(); |
| | | |
| | | if (!ok) |
| | | { |
| | | EditorUtility.DisplayDialog("Dll 打包失败", "Dll Package 打包失败,已中止构建。\n请查看 Console 日志。", "确定"); |
| | | return; |
| | | } |
| | | |
| | | AssetDatabase.Refresh(); |
| | | |
| | | // Step 2: 构建平台包 |
| | | BuildPlayerForCurrentPlatform(outputPath); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取平台包输出路径,格式: D:\{Platform}Output1 |
| | | /// </summary> |
| | | private static string GetPlayerOutputPath() |
| | | { |
| | | BuildTarget target = EditorUserBuildSettings.activeBuildTarget; |
| | | string basePath = $"D:\\{target}Output1"; |
| | | |
| | | switch (target) |
| | | { |
| | | case BuildTarget.Android: |
| | | return System.IO.Path.Combine(basePath, $"{target}.apk"); |
| | | case BuildTarget.StandaloneWindows: |
| | | case BuildTarget.StandaloneWindows64: |
| | | return System.IO.Path.Combine(basePath, $"{target}.exe"); |
| | | default: // WebGL, iOS 等输出到文件夹 |
| | | return basePath; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 构建当前平台的 Player 包 |
| | | /// </summary> |
| | | private static void BuildPlayerForCurrentPlatform(string outputPath) |
| | | { |
| | | BuildTarget target = EditorUserBuildSettings.activeBuildTarget; |
| | | |
| | | Debug.Log($"[YooAssetBuildTool] ========== 开始构建 {target} 平台包 =========="); |
| | | Debug.Log($"[YooAssetBuildTool] 输出路径: {outputPath}"); |
| | | |
| | | EditorUtility.DisplayProgressBar("构建平台包...", $"正在构建 {target}...", 0.5f); |
| | | |
| | | var buildOptions = new BuildPlayerOptions |
| | | { |
| | | scenes = new string[] { "Assets/Resources/Scenes/Launch.unity" }, |
| | | locationPathName = outputPath, |
| | | target = target, |
| | | options = BuildOptions.None, |
| | | }; |
| | | |
| | | var report = BuildPipeline.BuildPlayer(buildOptions); |
| | | EditorUtility.ClearProgressBar(); |
| | | |
| | | if (report.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded) |
| | | { |
| | | double totalMinutes = report.summary.totalTime.TotalMinutes; |
| | | Debug.Log($"[YooAssetBuildTool] ✓ {target} 平台包构建成功!耗时: {totalMinutes:F1}分钟, 输出: {outputPath}"); |
| | | EditorUtility.DisplayDialog("构建成功", |
| | | $"{target} 平台包构建成功!\n\n耗时: {totalMinutes:F1}分钟\n输出路径: {outputPath}", "确定"); |
| | | } |
| | | else |
| | | { |
| | | Debug.LogError($"[YooAssetBuildTool] ✗ {target} 平台包构建失败: {report.summary.result}"); |
| | | EditorUtility.DisplayDialog("构建失败", |
| | | $"{target} 平台包构建失败!\n\n结果: {report.summary.result}\n错误数: {report.summary.totalErrors}\n请查看 Console 日志。", "确定"); |
| | | } |
| | | } |
| | | |
| | | // ==================================================================== |
| | |
| | | // SingletonMonobehaviour<object> |
| | | // Spine.ExposedList.Enumerator<object> |
| | | // Spine.ExposedList<object> |
| | | // System.Action<BattleClickBuffData> |
| | | // System.Action<BattleClickHeroData> |
| | | // System.Action<Cysharp.Threading.Tasks.UniTask> |
| | | // System.Action<Int2> |
| | |
| | | // System.Linq.Buffer<ushort> |
| | | // System.Linq.Enumerable.<CastIterator>d__99<object> |
| | | // System.Linq.Enumerable.<ConcatIterator>d__59<int> |
| | | // System.Linq.Enumerable.<ConcatIterator>d__59<object> |
| | | // System.Linq.Enumerable.<DistinctIterator>d__68<int> |
| | | // System.Linq.Enumerable.<TakeIterator>d__25<object> |
| | | // System.Linq.Enumerable.Iterator<System.Collections.Generic.KeyValuePair<int,int>> |
| | |
| | | // System.Nullable<UnityEngine.Color> |
| | | // System.Nullable<UnityEngine.Vector2> |
| | | // System.Nullable<byte> |
| | | // System.Nullable<float> |
| | | // System.Nullable<int> |
| | | // System.Nullable<object> |
| | | // System.Nullable<uint> |
| | |
| | | // System.Threading.Tasks.Task<byte> |
| | | // System.Threading.Tasks.Task<int> |
| | | // System.Threading.Tasks.Task<object> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,object>>>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,object>>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,int>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,object>>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,int>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,object>>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,byte>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,int>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,System.ValueTuple<byte,object>>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,byte>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,int>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<System.ValueTuple<byte,object>> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<byte> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<int> |
| | | // System.Threading.Tasks.TaskFactory.<>c__DisplayClass35_0<object> |
| | | // System.Threading.Tasks.TaskFactory<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>>>>>> |
| | | // System.Threading.Tasks.TaskFactory<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,object>>>>>>>> |
| | | // System.Threading.Tasks.TaskFactory<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>>>>> |
| | |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UniTask.Awaiter<object>,object>(Cysharp.Threading.Tasks.UniTask.Awaiter<object>&,object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UnityAsyncExtensions.AssetBundleCreateRequestAwaiter,object>(Cysharp.Threading.Tasks.UnityAsyncExtensions.AssetBundleCreateRequestAwaiter&,object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UnityAsyncExtensions.ResourceRequestAwaiter,object>(Cysharp.Threading.Tasks.UnityAsyncExtensions.ResourceRequestAwaiter&,object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.UnityAsyncExtensions.UnityWebRequestAsyncOperationAwaiter,object>(Cysharp.Threading.Tasks.UnityAsyncExtensions.UnityWebRequestAsyncOperationAwaiter&,object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<Cysharp.Threading.Tasks.YieldAwaitable.Awaiter,object>(Cysharp.Threading.Tasks.YieldAwaitable.Awaiter&,object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<object>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<object>,object>(System.Runtime.CompilerServices.TaskAwaiter<object>&,object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Start<object>(object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<System.ValueTuple<byte,object>>.Start<object>(object&) |
| | | // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder<byte>.Start<object>(object&) |
| | |
| | | // object DG.Tweening.TweenSettingsExtensions.SetAutoKill<object>(object,bool) |
| | | // object DG.Tweening.TweenSettingsExtensions.SetEase<object>(object,DG.Tweening.Ease) |
| | | // object DG.Tweening.TweenSettingsExtensions.SetEase<object>(object,UnityEngine.AnimationCurve) |
| | | // object DG.Tweening.TweenSettingsExtensions.SetLoops<object>(object,int) |
| | | // object DG.Tweening.TweenSettingsExtensions.SetLoops<object>(object,int,DG.Tweening.LoopType) |
| | | // object DG.Tweening.TweenSettingsExtensions.SetTarget<object>(object,object) |
| | | // object DG.Tweening.TweenSettingsExtensions.SetUpdate<object>(object,bool) |
| | | // UnityEngine.Vector2 LitJson.JsonMapper.ToObject<UnityEngine.Vector2>(string) |
| | | // object LitJson.JsonMapper.ToObject<object>(string) |
| | | // object System.Activator.CreateInstance<object>() |
| | |
| | | // System.Collections.Generic.IEnumerable<object> System.Linq.Enumerable.Cast<object>(System.Collections.IEnumerable) |
| | | // System.Collections.Generic.IEnumerable<object> System.Linq.Enumerable.CastIterator<object>(System.Collections.IEnumerable) |
| | | // System.Collections.Generic.IEnumerable<int> System.Linq.Enumerable.Concat<int>(System.Collections.Generic.IEnumerable<int>,System.Collections.Generic.IEnumerable<int>) |
| | | // System.Collections.Generic.IEnumerable<object> System.Linq.Enumerable.Concat<object>(System.Collections.Generic.IEnumerable<object>,System.Collections.Generic.IEnumerable<object>) |
| | | // System.Collections.Generic.IEnumerable<int> System.Linq.Enumerable.ConcatIterator<int>(System.Collections.Generic.IEnumerable<int>,System.Collections.Generic.IEnumerable<int>) |
| | | // System.Collections.Generic.IEnumerable<object> System.Linq.Enumerable.ConcatIterator<object>(System.Collections.Generic.IEnumerable<object>,System.Collections.Generic.IEnumerable<object>) |
| | | // int System.Linq.Enumerable.Count<object>(System.Collections.Generic.IEnumerable<object>,System.Func<object,bool>) |
| | | // System.Collections.Generic.IEnumerable<int> System.Linq.Enumerable.Distinct<int>(System.Collections.Generic.IEnumerable<int>) |
| | | // System.Collections.Generic.IEnumerable<int> System.Linq.Enumerable.DistinctIterator<int>(System.Collections.Generic.IEnumerable<int>,System.Collections.Generic.IEqualityComparer<int>) |
| | |
| | | <type fullname="DG.Tweening.DOTween" preserve="all" />
|
| | | <type fullname="DG.Tweening.DOVirtual" preserve="all" />
|
| | | <type fullname="DG.Tweening.Ease" preserve="all" />
|
| | | <type fullname="DG.Tweening.LoopType" preserve="all" />
|
| | | <type fullname="DG.Tweening.PathMode" preserve="all" />
|
| | | <type fullname="DG.Tweening.PathType" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Core.PathCore.Path" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Options.ColorOptions" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Options.FloatOptions" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Options.PathOptions" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Options.QuaternionOptions" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Options.StringOptions" preserve="all" />
|
| | | <type fullname="DG.Tweening.Plugins.Options.VectorOptions" preserve="all" />
|
| | | <type fullname="DG.Tweening.RotateMode" preserve="all" />
|
| | | <type fullname="DG.Tweening.ScrambleMode" preserve="all" />
|
| | | <type fullname="DG.Tweening.Sequence" preserve="all" />
|
| | | <type fullname="DG.Tweening.ShortcutExtensions" preserve="all" />
|
| | |
| | | <type fullname="Singleton`1" preserve="all" />
|
| | | <type fullname="StringUtility" preserve="all" />
|
| | | <type fullname="TextUnline" preserve="all" />
|
| | | <type fullname="VersionConfigEx" preserve="all" />
|
| | | </assembly>
|
| | | <assembly fullname="System">
|
| | | <type fullname="System.CodeDom.Compiler.GeneratedCodeAttribute" preserve="all" />
|
| | |
| | | <type fullname="System.Collections.Specialized.OrderedDictionary" preserve="all" />
|
| | | <type fullname="System.ComponentModel.EditorBrowsableAttribute" preserve="all" />
|
| | | <type fullname="System.ComponentModel.EditorBrowsableState" preserve="all" />
|
| | | <type fullname="System.Diagnostics.Process" preserve="all" />
|
| | | <type fullname="System.Diagnostics.ProcessStartInfo" preserve="all" />
|
| | | <type fullname="System.Net.NetworkInformation.NetworkInterface" preserve="all" />
|
| | | <type fullname="System.Net.NetworkInformation.PhysicalAddress" preserve="all" />
|
| | | <type fullname="System.Net.ServicePointManager" preserve="all" />
|
| | | <type fullname="System.Net.WebRequest" preserve="all" />
|
| | | <type fullname="System.Net.WebResponse" preserve="all" />
|
| | | <type fullname="System.Text.RegularExpressions.Capture" preserve="all" />
|
| | | <type fullname="System.Text.RegularExpressions.Group" preserve="all" />
|
| | | <type fullname="System.Text.RegularExpressions.GroupCollection" preserve="all" />
|
| | |
| | | <assembly fullname="UnityEngine.IMGUIModule">
|
| | | <type fullname="UnityEngine.GUILayout" preserve="all" />
|
| | | <type fullname="UnityEngine.GUILayoutOption" preserve="all" />
|
| | | <type fullname="UnityEngine.GUIUtility" preserve="all" />
|
| | | </assembly>
|
| | | <assembly fullname="UnityEngine.InputLegacyModule">
|
| | | <type fullname="UnityEngine.Input" preserve="all" />
|
| | |
| | | <type fullname="UnityEngine.UI.HorizontalLayoutGroup" preserve="all" />
|
| | | <type fullname="UnityEngine.UI.HorizontalOrVerticalLayoutGroup" preserve="all" />
|
| | | <type fullname="UnityEngine.UI.Image" preserve="all" />
|
| | | <type fullname="UnityEngine.UI.Image/Type" preserve="all" />
|
| | | <type fullname="UnityEngine.UI.InputField" preserve="all" />
|
| | | <type fullname="UnityEngine.UI.InputField/OnChangeEvent" preserve="all" />
|
| | | <type fullname="UnityEngine.UI.InputField/OnValidateInput" preserve="all" />
|
| | |
| | | <type fullname="UnityEngine.CanvasGroup" preserve="all" />
|
| | | <type fullname="UnityEngine.ICanvasRaycastFilter" preserve="all" />
|
| | | <type fullname="UnityEngine.RectTransformUtility" preserve="all" />
|
| | | <type fullname="UnityEngine.RenderMode" preserve="all" />
|
| | | </assembly>
|
| | | <assembly fullname="UnityEngine.UnityWebRequestModule">
|
| | | <type fullname="UnityEngine.Networking.DownloadHandler" preserve="all" />
|
| | |
| | | <type fullname="System.IO.FileInfo" preserve="all" />
|
| | | <type fullname="System.IO.FileSystemInfo" preserve="all" />
|
| | | <type fullname="System.IO.Path" preserve="all" />
|
| | | <type fullname="System.IO.Stream" preserve="all" />
|
| | | <type fullname="System.IO.StreamReader" preserve="all" />
|
| | | <type fullname="System.IO.TextReader" preserve="all" />
|
| | | <type fullname="System.IProgress`1" preserve="all" />
|
| | | <type fullname="System.Int16" preserve="all" />
|
| | | <type fullname="System.Int32" preserve="all" />
|
| | |
| | | <type fullname="System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" preserve="all" />
|
| | | <type fullname="System.Runtime.CompilerServices.RuntimeHelpers" preserve="all" />
|
| | | <type fullname="System.Runtime.CompilerServices.TaskAwaiter" preserve="all" />
|
| | | <type fullname="System.Runtime.CompilerServices.TaskAwaiter`1" preserve="all" />
|
| | | <type fullname="System.Runtime.CompilerServices.TupleElementNamesAttribute" preserve="all" />
|
| | | <type fullname="System.RuntimeFieldHandle" preserve="all" />
|
| | | <type fullname="System.RuntimeTypeHandle" preserve="all" />
|
| | |
| | | <type fullname="System.Threading.Interlocked" preserve="all" />
|
| | | <type fullname="System.Threading.Monitor" preserve="all" />
|
| | | <type fullname="System.Threading.Tasks.Task" preserve="all" />
|
| | | <type fullname="System.Threading.Tasks.Task`1" preserve="all" />
|
| | | <type fullname="System.Threading.Thread" preserve="all" />
|
| | | <type fullname="System.TimeSpan" preserve="all" />
|
| | | <type fullname="System.Type" preserve="all" />
|
| | |
| | | <type fullname="Spine.TrackEntry" preserve="all" />
|
| | | </assembly>
|
| | | <assembly fullname="spine-unity">
|
| | | <type fullname="Spine.Unity.AtlasAssetBase" preserve="all" />
|
| | | <type fullname="Spine.Unity.BoneFollower" preserve="all" />
|
| | | <type fullname="Spine.Unity.BoneFollowerGraphic" preserve="all" />
|
| | | <type fullname="Spine.Unity.MeshGenerator" preserve="all" />
|
| | |
| | | <type fullname="Spine.Unity.SkeletonDataAsset" preserve="all" />
|
| | | <type fullname="Spine.Unity.SkeletonGraphic" preserve="all" />
|
| | | <type fullname="Spine.Unity.SkeletonRenderer" preserve="all" />
|
| | | <type fullname="Spine.Unity.UpdateMode" preserve="all" />
|
| | | </assembly>
|
| | | </linker> |
| | |
| | | //checkList 用于外部检查文件下载后是否一致,不包含没有文件的情况 |
| | | public bool CheckLocalFileValid(List<bool> checkList = null) |
| | | { |
| | | #if UNITY_WEBGL |
| | | return true; |
| | | #else |
| | | string path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath); |
| | | var fileInfo = new FileInfo(path); |
| | | |
| | |
| | | return false; |
| | | } |
| | | return true; |
| | | |
| | | #endif |
| | | } |
| | | |
| | | // 检查外部存储文件是否存在 |
| | |
| | | // 存在则比较 |
| | | public bool CheckLocalFileValid(AssetVersion otherAssetInfo) |
| | | { |
| | | #if UNITY_WEBGL |
| | | return true; |
| | | #else |
| | | string path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath); |
| | | |
| | | if (!File.Exists(path)) |
| | |
| | | |
| | | return CheckLocalFileValid(); |
| | | |
| | | #endif |
| | | } |
| | | } |
| | | } |
| | |
| | | //创建对应的文件文件夹路径 |
| | | public static void MakeSureDirectory(string filePath) |
| | | { |
| | | #if UNITY_WEBGL |
| | | return; |
| | | #else |
| | | string dir = Path.GetDirectoryName(filePath); |
| | | if (!Directory.Exists(dir)) |
| | | { |
| | | Directory.CreateDirectory(dir); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public static List<FileInfo> GetFileInfos(string _path, string[] _searchPatterns) |
| | | { |
| | | #if UNITY_WEBGL |
| | | return null; |
| | | #else |
| | | if (_searchPatterns == null) |
| | | { |
| | | return null; |
| | |
| | | } |
| | | |
| | | return fileInfoes; |
| | | #endif |
| | | } |
| | | |
| | | public static void GetAllDirectoryFileInfos(string _path, List<FileInfo> _fileInfos, string exclude = "") |
| | | { |
| | | #if UNITY_WEBGL |
| | | return; |
| | | #else |
| | | var directoryInfo = new DirectoryInfo(_path); |
| | | var allFileSystemInfos = directoryInfo.GetFileSystemInfos(); |
| | | |
| | |
| | | _fileInfos.Add(fileSystemInfo as FileInfo); |
| | | } |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public static string GetFileRelativePath(string _root, string _fileFullName) |
| | |
| | | |
| | | public static void DirectoryCopy(string _from, string _to) |
| | | { |
| | | #if UNITY_WEBGL |
| | | return; |
| | | #else |
| | | if (!Directory.Exists(_from)) |
| | | { |
| | | return; |
| | |
| | | var toDirName = Path.Combine(_to, dirName); |
| | | DirectoryCopy(fromDirName, toDirName); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public static string GetMD5HashFromFile(string fileName) |
| | | { |
| | | #if UNITY_WEBGL |
| | | return string.Empty; |
| | | #else |
| | | try |
| | | { |
| | | var file = new FileStream(fileName, System.IO.FileMode.Open); |
| | |
| | | { |
| | | throw new Exception("GetMD5HashFromFile() fail,error:" + ex.Message); |
| | | } |
| | | #endif |
| | | } |
| | | |
| | | public static string GetStringMD5Hash(string str) |
| | |
| | | |
| | | public static void Create(string _url, string _method, string _content, string _contentType, int _retry = 3, Action<bool, string> _result = null) |
| | | { |
| | | #if UNITY_WEBGL |
| | | // WebGL请使用CreateAsync |
| | | Debug.LogWarning("[HttpBehaviour] Create() 不支持WebGL,请使用CreateAsync()"); |
| | | _result?.Invoke(false, "WebGL不支持HttpWebRequest"); |
| | | return; |
| | | #else |
| | | var carrier = new GameObject(); |
| | | GameObject.DontDestroyOnLoad(carrier); |
| | | carrier.hideFlags = HideFlags.HideInHierarchy; |
| | | var behaviour = carrier.AddComponent<HttpBehaviour>(); |
| | | behaviour.Begin(_url, _method, _content, _contentType, _retry, _result); |
| | | #endif |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | {
|
| | | Debug.unityLogger.logEnabled = true;
|
| | | }
|
| | |
|
| | | #else
|
| | | Debug.unityLogger.logEnabled = true;
|
| | | #endif
|
| | |
|
| | | }
|
| | |
| | | { |
| | | return ""; |
| | | } |
| | | if (!languageStartDict.ContainsKey(VersionConfigEx.Get().appId)) |
| | | if (VersionConfigEx.config == null || !languageStartDict.ContainsKey(VersionConfigEx.config.appId)) |
| | | { |
| | | return ""; |
| | | } |
| | |
| | | languageStartDict = JsonMapper.ToObject<Dictionary<string, string[]>>(config.Numerical2); |
| | | languageDict = JsonMapper.ToObject<Dictionary<string, string>>(config.Numerical3); |
| | | |
| | | if (languageStartDict == null || !languageStartDict.ContainsKey(VersionConfigEx.Get().appId)) |
| | | if (languageStartDict == null || VersionConfigEx.config == null || !languageStartDict.ContainsKey(VersionConfigEx.config.appId)) |
| | | { |
| | | //检查有没多语言 |
| | | Debug.Log("当前渠道未开启多语言:" + VersionConfigEx.Get().appId); |
| | | Debug.Log("当前渠道未开启多语言:" + (VersionConfigEx.config != null ? VersionConfigEx.config.appId : "null")); |
| | | return; |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | var defaultCfg = languageStartDict[VersionConfigEx.Get().appId]; |
| | | var defaultCfg = languageStartDict[VersionConfigEx.config.appId]; |
| | | string languageMark; |
| | | if (defaultCfg[1] == "0") |
| | | { |
| | |
| | | // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html |
| | | // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle |
| | | // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version |
| | | id 'com.android.application' version '7.1.2' apply false |
| | | id 'com.android.library' version '7.1.2' apply false |
| | | id 'com.android.application' version '7.4.2' apply false |
| | | id 'com.android.library' version '7.4.2' apply false |
| | | //id 'com.android.tools.build' version "7.3.0" apply false |
| | | id "com.google.gms.google-services" version "4.3.10" apply false |
| | | id 'com.google.firebase.crashlytics' version '2.8.1' apply false |