From 53eabc0501bb1df659761c8c5979fc5c60bbbb79 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期二, 31 三月 2026 19:47:04 +0800
Subject: [PATCH] webgl
---
Assets/Launch/Common/FileExtersion.cs | 20 ++++
Assets/HybridCLRGenerate/AOTGenericReferences.cs | 29 +----
/dev/null | 8 -
Assets/Launch/Manager/LocalResManager.cs | 8
Assets/Editor/YooAsset/YooAssetBuildTool.cs | 161 ++++++++++++++++++++++++++++++--
Assets/Launch/Common/AssetVersion.cs | 9 +
Assets/HybridCLRGenerate/link.xml | 20 +--
Assets/Launch/Launch.cs | 3
Assets/Launch/HttpRequest/HttpBehaviour.cs | 7 +
Assets/Plugins/Android/baseProjectTemplate.gradle | 4
10 files changed, 209 insertions(+), 60 deletions(-)
diff --git a/Assets/Editor/YooAsset/YooAssetBuildTool.cs b/Assets/Editor/YooAsset/YooAssetBuildTool.cs
index 5306fad..b43f54d 100644
--- a/Assets/Editor/YooAsset/YooAssetBuildTool.cs
+++ b/Assets/Editor/YooAsset/YooAssetBuildTool.cs
@@ -199,6 +199,28 @@
return;
}
+ bool success = BuildAllPackagesCore(incremental);
+
+ if (!success)
+ {
+ EditorUtility.DisplayDialog("鎵撳寘瀹屾垚锛堟湁澶辫触锛�", "閮ㄥ垎 Package 鎵撳寘澶辫触锛岃妫�鏌� Console 鏃ュ織銆�", "纭畾");
+ }
+ else
+ {
+ bool toggleAB = EditorUtility.DisplayDialog("鎵撳寘鎴愬姛锛�", "鎵�鏈� Package 鎵撳寘瀹屾垚锛乗n\n鏄惁绔嬪嵆寮�鍚� AB 妯″紡锛�", "寮�鍚疉B妯″紡", "鏆備笉寮�鍚�");
+ if (toggleAB)
+ {
+ EditorPrefs.SetBool("YooAsset_UseAssetBundle", true);
+ Debug.Log("[YooAssetBuildTool] AB妯″紡宸插紑鍚紝杩愯妯″紡: OfflinePlayMode");
+ }
+ }
+ }
+
+ /// <summary>
+ /// 璧勬簮鎵撳寘鏍稿績閫昏緫锛堜笉鍚‘璁ゅ璇濇锛夛紝杩斿洖鏄惁鍏ㄩ儴鎴愬姛銆�
+ /// </summary>
+ private static bool BuildAllPackagesCore(bool incremental)
+ {
// ---- 鎵撳寘鍓嶏細HybridCLR DLL锛堝閲忔ā寮忚烦杩囷級----
if (!incremental)
{
@@ -207,7 +229,7 @@
EditorUtility.DisplayDialog("鎷疯礉 DLL 澶辫触",
"HybridCLR DLL 鎷疯礉澶辫触锛岃鍏堟墽琛� HybridCLR/Generate/All 鐢熸垚 DLL 鏂囦欢銆俓n璇︽儏璇锋煡鐪� Console 鏃ュ織銆�",
"纭畾");
- return;
+ return false;
}
}
@@ -252,21 +274,140 @@
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 妯″紡锛�", "寮�鍚疉B妯″紡", "鏆備笉寮�鍚�");
- 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 鎵撳寘涓�...", "姝e湪鎷疯礉 HybridCLR DLL...", 0.1f);
+ if (!CopyHybridCLRDlls())
+ {
+ EditorUtility.ClearProgressBar();
+ EditorUtility.DisplayDialog("鎷疯礉 DLL 澶辫触",
+ "HybridCLR DLL 鎷疯礉澶辫触锛岃鍏堟墽琛� HybridCLR/Generate/All銆�", "纭畾");
+ return;
+ }
+
+ string version = GenerateVersion();
+ EditorUtility.DisplayProgressBar("YooAsset 鎵撳寘涓�...", "姝e湪鎵撳寘 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("鏋勫缓骞冲彴鍖�...", $"姝e湪鏋勫缓 {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 鏃ュ織銆�", "纭畾");
+ }
}
// ====================================================================
diff --git a/Assets/HybridCLRGenerate/AOTGenericReferences.cs b/Assets/HybridCLRGenerate/AOTGenericReferences.cs
index ef83b46..e1f23ee 100644
--- a/Assets/HybridCLRGenerate/AOTGenericReferences.cs
+++ b/Assets/HybridCLRGenerate/AOTGenericReferences.cs
@@ -204,6 +204,7 @@
// SingletonMonobehaviour<object>
// Spine.ExposedList.Enumerator<object>
// Spine.ExposedList<object>
+ // System.Action<BattleClickBuffData>
// System.Action<BattleClickHeroData>
// System.Action<Cysharp.Threading.Tasks.UniTask>
// System.Action<Int2>
@@ -1106,6 +1107,7 @@
// 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>>
@@ -1188,6 +1190,7 @@
// System.Nullable<UnityEngine.Color>
// System.Nullable<UnityEngine.Vector2>
// System.Nullable<byte>
+ // System.Nullable<float>
// System.Nullable<int>
// System.Nullable<object>
// System.Nullable<uint>
@@ -1461,25 +1464,6 @@
// 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>>>>>>>
@@ -1643,8 +1627,8 @@
// 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&)
@@ -1667,7 +1651,10 @@
// 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>()
@@ -1703,7 +1690,9 @@
// 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>)
diff --git a/Assets/HybridCLRGenerate/link.xml b/Assets/HybridCLRGenerate/link.xml
index 7387745..791f09d 100644
--- a/Assets/HybridCLRGenerate/link.xml
+++ b/Assets/HybridCLRGenerate/link.xml
@@ -7,14 +7,17 @@
<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" />
@@ -50,6 +53,7 @@
<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" />
@@ -60,13 +64,7 @@
<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" />
@@ -244,7 +242,6 @@
<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" />
@@ -303,7 +300,6 @@
<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" />
@@ -331,7 +327,6 @@
<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" />
@@ -472,9 +467,6 @@
<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" />
@@ -516,7 +508,6 @@
<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" />
@@ -531,7 +522,6 @@
<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" />
@@ -557,6 +547,7 @@
<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" />
@@ -565,5 +556,6 @@
<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>
\ No newline at end of file
diff --git a/Assets/Launch/Common/AssetVersion.cs b/Assets/Launch/Common/AssetVersion.cs
index 06ff4a5..1a21583 100644
--- a/Assets/Launch/Common/AssetVersion.cs
+++ b/Assets/Launch/Common/AssetVersion.cs
@@ -56,6 +56,9 @@
//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);
@@ -84,7 +87,7 @@
return false;
}
return true;
-
+#endif
}
// 妫�鏌ュ閮ㄥ瓨鍌ㄦ枃浠舵槸鍚﹀瓨鍦�
@@ -92,6 +95,9 @@
// 瀛樺湪鍒欐瘮杈�
public bool CheckLocalFileValid(AssetVersion otherAssetInfo)
{
+#if UNITY_WEBGL
+ return true;
+#else
string path = StringUtility.Concat(ResourcesPath.Instance.ExternalStorePath, m_RelativePath);
if (!File.Exists(path))
@@ -117,6 +123,7 @@
return CheckLocalFileValid();
+#endif
}
}
}
\ No newline at end of file
diff --git a/Assets/Launch/Common/FileExtersion.cs b/Assets/Launch/Common/FileExtersion.cs
index a59d144..368e8b1 100644
--- a/Assets/Launch/Common/FileExtersion.cs
+++ b/Assets/Launch/Common/FileExtersion.cs
@@ -13,15 +13,22 @@
//鍒涘缓瀵瑰簲鐨勬枃浠舵枃浠跺す璺緞
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;
@@ -41,10 +48,14 @@
}
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();
@@ -65,6 +76,7 @@
_fileInfos.Add(fileSystemInfo as FileInfo);
}
}
+#endif
}
public static string GetFileRelativePath(string _root, string _fileFullName)
@@ -128,6 +140,9 @@
public static void DirectoryCopy(string _from, string _to)
{
+#if UNITY_WEBGL
+ return;
+#else
if (!Directory.Exists(_from))
{
return;
@@ -153,10 +168,14 @@
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);
@@ -174,6 +193,7 @@
{
throw new Exception("GetMD5HashFromFile() fail,error:" + ex.Message);
}
+#endif
}
public static string GetStringMD5Hash(string str)
diff --git a/Assets/Launch/HttpRequest/HttpBehaviour.cs b/Assets/Launch/HttpRequest/HttpBehaviour.cs
index 45f11d9..680d68a 100644
--- a/Assets/Launch/HttpRequest/HttpBehaviour.cs
+++ b/Assets/Launch/HttpRequest/HttpBehaviour.cs
@@ -36,11 +36,18 @@
public static void Create(string _url, string _method, string _content, string _contentType, int _retry = 3, Action<bool, string> _result = null)
{
+#if UNITY_WEBGL
+ // WebGL璇蜂娇鐢–reateAsync
+ Debug.LogWarning("[HttpBehaviour] Create() 涓嶆敮鎸乄ebGL锛岃浣跨敤CreateAsync()");
+ _result?.Invoke(false, "WebGL涓嶆敮鎸丠ttpWebRequest");
+ 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>
diff --git a/Assets/Launch/Launch.cs b/Assets/Launch/Launch.cs
index f504147..41bb49d 100644
--- a/Assets/Launch/Launch.cs
+++ b/Assets/Launch/Launch.cs
@@ -67,7 +67,8 @@
{
Debug.unityLogger.logEnabled = true;
}
-
+#else
+ Debug.unityLogger.logEnabled = true;
#endif
}
diff --git a/Assets/Launch/Manager/LocalResManager.cs b/Assets/Launch/Manager/LocalResManager.cs
index 2958cc2..3b26622 100644
--- a/Assets/Launch/Manager/LocalResManager.cs
+++ b/Assets/Launch/Manager/LocalResManager.cs
@@ -106,7 +106,7 @@
{
return "";
}
- if (!languageStartDict.ContainsKey(VersionConfigEx.Get().appId))
+ if (VersionConfigEx.config == null || !languageStartDict.ContainsKey(VersionConfigEx.config.appId))
{
return "";
}
@@ -433,10 +433,10 @@
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;
}
@@ -450,7 +450,7 @@
return;
}
- var defaultCfg = languageStartDict[VersionConfigEx.Get().appId];
+ var defaultCfg = languageStartDict[VersionConfigEx.config.appId];
string languageMark;
if (defaultCfg[1] == "0")
{
diff --git a/Assets/Plugins/Android/baseProjectTemplate.gradle b/Assets/Plugins/Android/baseProjectTemplate.gradle
index e9ff3ad..2becbd2 100644
--- a/Assets/Plugins/Android/baseProjectTemplate.gradle
+++ b/Assets/Plugins/Android/baseProjectTemplate.gradle
@@ -3,8 +3,8 @@
// 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
diff --git a/Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset b/Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset
deleted file mode 100644
index 482590c..0000000
--- a/Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "m_SettingKeys": [
- "VR Device Disabled",
- "VR Device User Alert"
- ],
- "m_SettingValues": [
- "False",
- "False"
- ]
-}
\ No newline at end of file
diff --git a/Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset.meta b/Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset.meta
deleted file mode 100644
index ed2b117..0000000
--- a/Assets/Plugins/NativeWebSocket/ProjectSettings/XRSettings.asset.meta
+++ /dev/null
@@ -1,8 +0,0 @@
-fileFormatVersion: 2
-guid: f4eafe2cae4c1e74fb799af05dc18de4
-NativeFormatImporter:
- externalObjects: {}
- mainObjectFileID: 0
- userData:
- assetBundleName:
- assetBundleVariant:
--
Gitblit v1.8.0