hexiaojie 9 месяцев назад
Родитель
Сommit
fd1bb0daa9

+ 17 - 0
GameClient/Assets/Editor/BuildEditor/WebGLBuildHelper.cs

@@ -0,0 +1,17 @@
+using UnityEditor;
+using UnityEngine;
+
+public class WebGLBuildHelper
+{
+    [MenuItem("Tools/WebGL/Enable Incremental Build")]
+    public static void EnableIncrementalBuild()
+    {
+        // 修正属性名称(Unity 2020.3.33 专用)
+        PlayerSettings.SetPropertyBool("incrementalBuild", true, BuildTargetGroup.WebGL);
+        PlayerSettings.SetPropertyBool("incrementalGC", true, BuildTargetGroup.WebGL);
+        
+        // 保存设置
+        AssetDatabase.SaveAssets();
+        Debug.Log("WebGL 增量构建已启用");
+    }
+}

+ 3 - 0
GameClient/Assets/Editor/BuildEditor/WebGLBuildHelper.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 095fc8c60bfa492d8e39b90302d9ba0d
+timeCreated: 1744734497

+ 106 - 21
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -13,40 +13,125 @@ namespace GFGGame
         public static async void Start()
         {
             //初始化声音,不可以去掉
-            MusicManager.Instance.Stop();
+            try
+            {
+                MusicManager.Instance.Stop();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试1" + e);
+                throw;
+            }
+
             Debug.Log($"正在初始化 MusicManager");
-            SoundManager.Instance.Stop();
+            try
+            {
+                SoundManager.Instance.Stop();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试2" + e);
+                throw;
+            }
+
             Debug.Log($"正在初始化 SoundManager");
-            VoiceManager.Instance.Stop();
+            try
+            {
+                VoiceManager.Instance.Stop();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试3" + e);
+                throw;
+            }
+
             Debug.Log($"正在初始化 VoiceManager");
             //GameObject对象池
-            PrefabManager.Instance.Init();
+            try
+            {
+                PrefabManager.Instance.Init();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试4" + e);
+                throw;
+            }
+
             Debug.Log($"正在初始化 PrefabManager");
-            //字体
-            await FontLoader.Instance.Init();
+            try
+            {
+                //字体
+                await FontLoader.Instance.Init();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试5" + e);
+                throw;
+            }
 
             Debug.Log($"正在初始化 FontLoader");
             //界面
-            UGUIManager.Instance.Init();
-            Debug.Log($"正在初始化 UGUIManager");
-            ViewManager.Init();
-            Debug.Log($"正在初始化 UGUIManager");
+            try
+            {
+                UGUIManager.Instance.Init();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试6" + e);
+                throw;
+            }
+
+            Debug.Log($"正在初始化 UGUIManager2");
             //日志
-            LogController.Instance.Init();
+            try
+            {
+                LogController.Instance.Init();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试8" + e);
+                throw;
+            }
+
             Debug.Log($"正在初始化 LogController");
-            //全局
-            GameGlobal.Init();
+            try
+            {
+                //全局
+                GameGlobal.Init();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试9" + e);
+                throw;
+            }
+
             Debug.Log($"正在初始化 GameGlobal");
             //sqlite
-            SqliteController.Instance.Init(false, ResPathUtil.SQLITE_FILE_PATH);
-            //渠道
-            QDManager.Init();
-            Debug.Log($"正在初始化 QDManager");
-            //全局点击效果
-            ViewGlobal.CreatClickEffect();
+            //SqliteController.Instance.Init(false, ResPathUtil.SQLITE_FILE_PATH);
+            try
+            {
+                //渠道
+                QDManager.Init();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试10" + e);
+                throw;
+            }
+
+
+
             Debug.Log($"正在初始化 ViewGlobal");
-            //获取游戏配置
-            GetGameCfg();
+            try
+            {
+                //获取游戏配置
+                GetGameCfg();
+            }
+            catch (Exception e)
+            {
+                Debug.LogError("调试12" + e);
+                throw;
+            }
         }
 
         /// <summary>

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GFGUIPackage.cs

@@ -42,6 +42,7 @@ namespace GFGGame
 
         public static async Task AddPackageAsync(string descFilePath)
         {
+            Debug.Log($"正在初始化 descFilePath:{descFilePath} 1");
             _assetCount.TryGetValue(descFilePath, out var count);
             if (count > 0)
             {
@@ -49,12 +50,15 @@ namespace GFGGame
                 return;
             }
             _assetCount.Add(descFilePath, count + 1);
+            Debug.Log($"正在初始化 descFilePath:{descFilePath} 2");
             var handle = YooAssets.LoadAssetAsync<TextAsset>($"{descFilePath}_fui.bytes");
+            Debug.Log($"正在初始化 descFilePath:{descFilePath} 3");
             await handle.Task;
             TextAsset textAsset = handle.AssetObject as TextAsset;
             CacheAssetHandle(descFilePath, handle);
             var uiPackage = UIPackage.AddPackage(textAsset.bytes, descFilePath, (string name, string extension, System.Type type, PackageItem item) =>
             {
+                Debug.Log($"正在初始化 descFilePath:{descFilePath} 4");
                 string location = name + extension;
                 if (!YooAssets.CheckResExist(location))
                 {
@@ -64,27 +68,34 @@ namespace GFGGame
                 CacheAssetHandle(descFilePath, handle);
                 handle.Completed += (handle) =>
                 {
+                    Debug.Log($"正在初始化 descFilePath:{descFilePath} 5");
                     if (handle.AssetObject == null) return;
                     Texture tex = handle.AssetObject as Texture;
                     if (tex != null)
                     {
+                        Debug.Log($"正在初始化 descFilePath:{descFilePath} 6");
                         string location = name + "!a" + extension;
                         if (YooAssets.CheckResExist(location))
                         {
+                            Debug.Log($"正在初始化 descFilePath:{descFilePath} 7");
                             AssetOperationHandle handleAlpha = YooAssets.LoadAssetAsync(location, type);
                             CacheAssetHandle(descFilePath, handleAlpha);
                             handleAlpha.Completed += (handle1) =>
                             {
+                                Debug.Log($"正在初始化 descFilePath:{descFilePath} 8");
                                 if (handle1.AssetObject == null) return;
                                 Texture alphaTex = handle1.AssetObject as Texture;
                                 item.owner.SetItemAsset(item, tex, alphaTex, DestroyMethod.None);//注意:这里一定要设置为None
+                                Debug.Log($"正在初始化 descFilePath:{descFilePath} 9");
                             };
                             return;
                         }
                     }
+                    Debug.Log($"正在初始化 descFilePath:{descFilePath} 10");
                     item.owner.SetItemAsset(item, handle.AssetObject, null, DestroyMethod.None);//注意:这里一定要设置为None
                 };
             });
+            Debug.Log($"正在初始化 descFilePath:{descFilePath} 11");
             _packages.Add(descFilePath, uiPackage);
             CheckRemovePackage(descFilePath);
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Sqlite/SqliteController.cs

@@ -29,7 +29,7 @@ namespace GFGGame
 
         private string GetSqlFilePath(string resPath)
         {
-            RawFileOperationHandle handle = YooAssets.LoadRawFileSync(resPath);
+            RawFileOperationHandle handle = YooAssets.LoadRawFileAsync(resPath);
             return handle.GetRawFilePath();
         }
 

+ 100 - 12
GameClient/Assets/Game/HotUpdate/UGUI/UGUIManager.cs

@@ -1,4 +1,5 @@
-using UnityEngine;
+using System;
+using UnityEngine;
 using YooAsset;
 
 namespace GFGGame
@@ -12,18 +13,105 @@ namespace GFGGame
             Debug.Log($"正在初始化 GetUUIPrefabPath");
             string path = ResPathUtil.GetUUIPrefabPath("UICanvas");
             Debug.Log($"正在初始化 handle");
-            var handle = YooAssets.LoadAssetSync<GameObject>(path);
-            Debug.Log($"正在初始化 canvas");
-            var canvas = handle.InstantiateSync();
-            Debug.Log($"正在初始化 desktop");
-            if (canvas == null)
+            // 1. 异步加载资源
+            var handle = YooAssets.LoadAssetAsync<GameObject>(path);
+            // Debug.Log($"正在初始化 canvas");
+            // var canvas = handle.InstantiateSync();
+            // Debug.Log($"正在初始化 desktop");
+            // if (canvas == null)
+            // {
+            //     Debug.Log($"正在初始化 canvas is null");
+            // }
+            //
+            //
+            // Debug.Log($"正在初始化 DontDestroyOnLoad");
+            // GameObject.DontDestroyOnLoad(canvas);
+            // Debug.Log($"正在初始化 Init end");
+
+            handle.Completed += (assetHandle) =>
             {
-                Debug.Log($"正在初始化 canvas is null");
-            }
-            
-            Debug.Log($"正在初始化 DontDestroyOnLoad");
-            GameObject.DontDestroyOnLoad(canvas);
-            Debug.Log($"正在初始化 Init end");
+                if (assetHandle.Status != EOperationStatus.Succeed)
+                {
+                    Debug.LogError($"加载失败: {assetHandle.LastError}");
+                    return;
+                }
+
+                // 2. 异步实例化
+                Debug.Log($"正在初始化 异步实例化");
+                var operation = assetHandle.InstantiateAsync();
+                if (operation == null)
+                {
+                    Debug.Log($"正在初始化 operation is null");
+                }
+
+                operation.Completed += (YooAsset.AsyncOperationBase op) =>
+                {
+                    if (op.Status != EOperationStatus.Succeed)
+                    {
+                        Debug.LogError($"实例化失败: {op.Error}");
+                        return;
+                    }
+
+                    // 方法1:强制类型转换
+                    var instantiateOp = op as InstantiateOperation;
+                    GameObject canvas = instantiateOp?.Result; // 也可能是 .GameObject
+
+                    // 方法2:如果支持泛型
+                    // GameObject canvas = (op as InstantiateOperation).GetResult();
+
+                    if (canvas == null)
+                    {
+                        Debug.LogError("实例化后的 canvas 为 null");
+                        return;
+                    }
+
+                    // 3. 查找 Desktop
+                    Transform desktopTransform = canvas.transform.Find("Desktop");
+                    if (desktopTransform == null)
+                    {
+                        Debug.LogError("Desktop 不存在,子物体列表:");
+                        foreach (Transform child in canvas.transform)
+                        {
+                            Debug.Log(child.name);
+                        }
+
+                        return;
+                    }
+
+                    desktop = desktopTransform.gameObject;
+                    if (operation == null)
+                    {
+                        Debug.Log($"正在初始化 DontDestroyOnLoad xixi");
+                    }
+
+                    GameObject.DontDestroyOnLoad(canvas);
+                    
+                    Debug.Log($"正在初始化 QDManager");
+                    try
+                    {
+                        //全局点击效果
+                        ViewGlobal.CreatClickEffect();
+                    }
+                    catch (Exception e)
+                    {
+                        Debug.LogError("调试11" + e);
+                        throw;
+                    }
+                    
+                    Debug.Log($"正在初始化 UGUIManager1");
+                    try
+                    {
+                        ViewManager.Init();
+                    }
+                    catch (Exception e)
+                    {
+                        Debug.LogError("调试7" + e);
+                        throw;
+                    }
+                    
+                    Debug.Log("UGUIManager 初始化完成");
+                };
+            };
 
             //// 初始化窗口系统
             //UniWindow.Initalize(desktop);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/UIView.cs

@@ -54,7 +54,7 @@ namespace GFGGame
             set
             {
                 _descFilePath = ResPathUtil.GetUIPackagePath(value);
-                GFGUIPackage.AddPackage(_descFilePath);
+                GFGUIPackage.AddPackageAsync(_descFilePath);
             }
         }
         /// <summary>

+ 11 - 1
GameClient/Assets/Game/HotUpdate/Views/ViewGlobal.cs

@@ -12,22 +12,32 @@ namespace GFGGame
 
         public static void CreatClickEffect()
         {
+            Debug.Log($"正在初始化 CreatClickEffect");
             if (comHolder == null)
             {
+                Debug.Log($"正在初始化 comHolder");
                 comHolder = UI_ComHolder.Create();
+                Debug.Log($"正在初始化 Create");
                 comHolder.target.touchable = false;
+                Debug.Log($"正在初始化 touchable");
                 ViewManager.AddChildToFloatLayer(comHolder.target);
+                Debug.Log($"正在初始化 SetPosition");
                 comHolder.target.SetPosition(-100, -100, 0);
-                _effectUI1 = EffectUIPool.CreateEffectUI(comHolder.m_holder, "ui_dj", "DJ");
+                Debug.Log($"正在初始化 SetClickPos");
                 GRoot.inst.onTouchBegin.Add(SetClickPos);
+                Debug.Log($"正在初始化 CreateEffectUI");
+                _effectUI1 = EffectUIPool.CreateEffectUI(comHolder.m_holder, "ui_dj", "DJ");
             }
         }
 
         private static void SetClickPos()
         {
+            Debug.Log($"正在初始化 GlobalToLocal");
             Vector2 pos = GRoot.inst.GlobalToLocal(Stage.inst.touchPosition);
+            Debug.Log($"正在初始化 SetPosition 1");
             comHolder.m_holder.visible = false;
             comHolder.m_holder.visible = true;
+            Debug.Log($"正在初始化 SetPosition 2");
             comHolder.target.SetPosition(pos.x, pos.y, 0);
         }
 

+ 18 - 10
GameClient/Assets/Game/HotUpdate/Views/ViewManager.cs

@@ -41,16 +41,20 @@ namespace GFGGame
 
         public static void Init()
         {
+            Debug.Log($"正在初始化 SetLoaderExtension");
             //设置CustomLoader
             UIObjectFactory.SetLoaderExtension(typeof(GFGGLoader));
+            Debug.Log($"正在初始化 Common");
             //通用资源,单独加,增加一次引用,不会被释放
-            GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("Common"));
-            GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("CommonGame"));
-            GFGUIPackage.AddPackage(ResPathUtil.GetUIPackagePath("Main"));
-
+            GFGUIPackage.AddPackageAsync(ResPathUtil.GetUIPackagePath("Common"));
+            Debug.Log($"正在初始化 CommonGame");
+            GFGUIPackage.AddPackageAsync(ResPathUtil.GetUIPackagePath("CommonGame"));
+            Debug.Log($"正在初始化 Main");
+            GFGUIPackage.AddPackageAsync(ResPathUtil.GetUIPackagePath("Main"));
+            Debug.Log($"正在初始化 NAudioClip");
             //await GFGUIPackage.AddPackageAsync(ResPathUtil.GetUIPackagePath("Common"));
             UIConfig.buttonSound = (NAudioClip)UIPackage.GetItemAsset("Common", "click");
-
+       
             //统一修改文字字体需要填写路径 ResIn/Font/FZKTJW--GB1-0
             UIConfig.defaultFont = "FZKTJW--GB1-0";
             //默认关闭点击窗口移至顶层的功能,不可打开,如哪个界面需要在界面中单独设置
@@ -59,28 +63,32 @@ namespace GFGGame
             _viewDic = new Dictionary<string, IUIView>();
 
             _viewStack = new List<ViewStructure>();
-
+            Debug.Log($"正在初始化 BottomLayer");
             //初始化视图层容器
             _bottomLayer = CreateLayer("BottomLayer");
             //_bottomLayer.sortingOrder = ConstSortingOrder.Bottom;
-
+            Debug.Log($"正在初始化 TopLayer");
             _topLayer = CreateLayer("TopLayer");
             _topLayer.sortingOrder = ConstViewLayerSortingOrder.TOP;
-
+            Debug.Log($"正在初始化 GuideLayer");
             _guideLayer = CreateLayer("GuideLayer");
             _guideLayer.sortingOrder = ConstViewLayerSortingOrder.Guide;
-
+            Debug.Log($"正在初始化 ModalLayer");
             _modalLayer = CreateLayer("ModalLayer");
             _modalLayer.sortingOrder = ConstViewLayerSortingOrder.Modal;
-
+            Debug.Log($"正在初始化 AlertLayer");
             _alertLayer = CreateLayer("AlertLayer");
             _alertLayer.sortingOrder = ConstViewLayerSortingOrder.Alert;
             //debug层
+            Debug.Log($"正在初始化 DebugLayer");
             _debugLayer = CreateLayer("DebugLayer");
             _debugLayer.sortingOrder = ConstViewLayerSortingOrder.Debug;
+            Debug.Log($"正在初始化 FloatLayer");
             _floatLayer = CreateLayer("FloatLayer");
             _floatLayer.sortingOrder = ConstViewLayerSortingOrder.Float;
+            Debug.Log($"正在初始化 SetMaskAlpha");
             SetMaskAlpha(0.6f);
+            Debug.Log($"正在初始化 SetMaskAlpha end");
         }
 
         public static void AddChildToBottomLayer(GObject gObject)

+ 16 - 40
GameClient/Assets/Game/Launcher/HotUpdateProxy/HotUpdateCodeLoader.cs

@@ -11,12 +11,14 @@ namespace GFGGame
 {
     public class HotUpdateCodeLoader : SingletonMonoBase<HotUpdateCodeLoader>
     {
-        public Type[] allTypes;
-
-        public Type[] GetTypes()
+        public static List<string> AOTMetaAssemblyNames { get; } = new List<string>()
         {
-            return this.allTypes;
-        }
+            "mscorlib.dll",
+            "System.dll",
+            "System.Core.dll",
+            "Game.Launcher.dll",
+            "ThirdParty.dll"
+        };
 
         private void Awake()
         {
@@ -25,46 +27,20 @@ namespace GFGGame
 
         public void StartLoad()
         {
-            StartCoroutine(StartLoadAssemblyHotfix());
+            Debug.Log("StartLoad - WebGL version (no hot update)");
+            StartCoroutine(LoadGameScene());
         }
 
-        IEnumerator StartLoadAssemblyHotfix()
+        IEnumerator LoadGameScene()
         {
-            yield return new WaitForSeconds(0.1f);
-
-            var dllPath = $"{LauncherConfig.DllDirHotfix}Game.HotUpdate.dll.bytes";
-            var handle = YooAssets.LoadAssetAsync<TextAsset>(dllPath);
-            yield return handle;
-
-            var asset = handle.AssetObject as TextAsset;
+            // 这里可以添加一些加载前的准备工作
+            Debug.Log("Preparing to load game scene...");
 
-            // WebGL平台特殊处理
-            LoadAssemblyForWebGL(asset.bytes);
-
-            handle.Release();
-
-            // 加载热更新场景
-            YooAssets.LoadSceneAsync("Assets/ResIn/Scene/HotUpdate.unity");
-        }
+            // 直接加载游戏场景
+            var sceneHandle = YooAssets.LoadSceneAsync("Assets/ResIn/Scene/HotUpdate.unity");
+            yield return sceneHandle;
 
-        void LoadAssemblyForWebGL(byte[] dllBytes)
-        {
-            // WebGL平台下需要使用JavaScript互操作来加载程序集
-            // 这里需要实现一个JavaScript插件来实际加载程序集
-
-            // 示例代码,实际实现可能需要与你的JavaScript插件配合
-            string dllContent = Convert.ToBase64String(dllBytes);
-            Application.ExternalCall("LoadHotUpdateAssembly", dllContent);
-
-            // 注意:在WebGL下可能无法直接获取所有类型,需要根据实际情况调整
-            this.allTypes = new Type[0]; // 可能需要从JS端获取类型信息
-            Debug.Log($"调试 LoadAssemblyForWebGL :{this.allTypes.Length}");
-        }
-
-        void LoadAssemblyJustInTime(Assembly assembly)
-        {
-            // 常规平台加载方式
-            this.allTypes = assembly.GetTypes();
+            Debug.Log("Game scene loaded successfully");
         }
     }
 }

+ 8 - 4
GameClient/Assets/ThirdParty/FairyGUI/Scripts/Event/EventDispatcher.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using UnityEngine;
 
 namespace FairyGUI
 {
@@ -204,21 +205,24 @@ namespace FairyGUI
 
         internal bool InternalDispatchEvent(string strType, EventBridge bridge, object data, object initiator)
         {
+            Debug.Log($"正在初始化 InternalDispatchEvent 1");
             if (bridge == null)
                 bridge = TryGetEventBridge(strType);
-
+            Debug.Log($"正在初始化 InternalDispatchEvent 2");
             EventBridge gBridge = null;
             if ((this is DisplayObject) && ((DisplayObject)this).gOwner != null)
                 gBridge = ((DisplayObject)this).gOwner.TryGetEventBridge(strType);
-
+            Debug.Log($"正在初始化 InternalDispatchEvent 3");
             bool b1 = bridge != null && !bridge.isEmpty;
             bool b2 = gBridge != null && !gBridge.isEmpty;
             if (b1 || b2)
             {
+                Debug.Log($"正在初始化 InternalDispatchEvent 44");
                 EventContext context = EventContext.Get();
                 context.initiator = initiator != null ? initiator : this;
                 context.type = strType;
                 context.data = data;
+                Debug.Log($"正在初始化 InternalDispatchEvent 4");
                 if (data is InputEvent)
                     sCurrentInputEvent = (InputEvent)data;
                 context.inputEvent = sCurrentInputEvent;
@@ -234,12 +238,12 @@ namespace FairyGUI
                     gBridge.CallCaptureInternal(context);
                     gBridge.CallInternal(context);
                 }
-
+                Debug.Log($"正在初始化 InternalDispatchEvent 5");
                 EventContext.Return(context);
                 context.initiator = null;
                 context.sender = null;
                 context.data = null;
-
+                Debug.Log($"正在初始化 InternalDispatchEvent 6");
                 return context._defaultPrevented;
             }
             else

+ 1 - 1
GameClient/Assets/ThirdParty/FairyGUI/Scripts/UI/GGroup.cs

@@ -312,7 +312,7 @@ namespace FairyGUI
                     child.SetXY(child.x + dx, child.y + dy);
                 }
             }
-
+            Debug.Log($"正在初始化 SetPosition xxxx5");
             _updating &= 2;
         }
 

+ 11 - 3
GameClient/Assets/ThirdParty/FairyGUI/Scripts/UI/GObject.cs

@@ -405,8 +405,10 @@ namespace FairyGUI
         /// <param name="zv">z value.</param>
         public void SetPosition(float xv, float yv, float zv)
         {
+            Debug.Log($"正在初始化 SetPosition xxxx");
             if (_x != xv || _y != yv || _z != zv)
             {
+                Debug.Log($"正在初始化 SetPosition xxxx1");
                 float dx = xv - _x;
                 float dy = yv - _y;
                 _x = xv;
@@ -414,18 +416,21 @@ namespace FairyGUI
                 _z = zv;
 
                 HandlePositionChanged();
-
+                Debug.Log($"正在初始化 SetPosition xxxx4");
                 if (this is GGroup)
                     ((GGroup)this).MoveChildren(dx, dy);
 
                 UpdateGear(1);
-
+                Debug.Log($"正在初始化 SetPosition xxxx5");
                 if (parent != null && !(parent is GList))
                 {
+                    Debug.Log($"正在初始化 SetPosition xxxx6");
                     parent.SetBoundsChangedFlag();
                     if (_group != null)
                         _group.SetBoundsChangedFlag(true);
+                    Debug.Log($"正在初始化 SetPosition xxxx7");
                     DispatchEvent("onPositionChanged", null);
+                    Debug.Log($"正在初始化 SetPosition xxxx8");
                 }
 
                 if (draggingObject == this && !sUpdateInDragging)
@@ -1259,7 +1264,7 @@ namespace FairyGUI
         {
             if (underConstruct || _gearLocked)
                 return;
-
+            Debug.Log($"正在初始化 SetPosition xxxx6");
             GearBase gear = _gears[index];
             if (gear != null && gear.controller != null)
                 gear.UpdateState();
@@ -1540,12 +1545,14 @@ namespace FairyGUI
         public Rect LocalToGlobal(Rect rect)
         {
             Rect ret = new Rect();
+            Debug.Log($"正在初始化 SetPosition xxxx9");
             Vector2 v = this.LocalToGlobal(new Vector2(rect.xMin, rect.yMin));
             ret.xMin = v.x;
             ret.yMin = v.y;
             v = this.LocalToGlobal(new Vector2(rect.xMax, rect.yMax));
             ret.xMax = v.x;
             ret.yMax = v.y;
+            Debug.Log($"正在初始化 SetPosition xxxx10");
             return ret;
         }
 
@@ -1852,6 +1859,7 @@ namespace FairyGUI
 
         virtual protected void HandlePositionChanged()
         {
+            Debug.Log($"正在初始化 SetPosition xxxx3");
             if (displayObject != null)
             {
                 float xv = _x;

+ 3 - 0
GameClient/GameClient.sln.DotSettings.user

@@ -5,6 +5,9 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMethodInfo_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb18a8b3398e74bca86895881dd02956c573648_003F94_003Fb7912d02_003FMethodInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMonoBehaviour_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F683a2b31bf9142429c44f02c75dbc6c913ce00_003F2e_003F343a2d95_003FMonoBehaviour_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOptionAttribute_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F16134578226e4e409ecbdd10473cf8f235000_003F4e_003Fb8b5740c_003FOptionAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APlayerSettings_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F8d4895b259be41298a685a0c9b42357576b400_003F5d_003Fad8914f5_003FPlayerSettings_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AResources_002Ecs_002Fl_003AC_0021_003FUsers_003Fadmin_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F683a2b31bf9142429c44f02c75dbc6c913ce00_003Fe5_003F66fcfb7a_003FResources_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AScriptableObject_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F683a2b31bf9142429c44f02c75dbc6c913ce00_003F1f_003F8a732769_003FScriptableObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AStack_00601_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc0c221501f3a41f8ac0af9d6a9dc9ff335fd90_003F1e_003Fdd8639eb_003FStack_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AVector3_002Ecs_002Fl_003AC_0021_003FUsers_003Fss510_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F683a2b31bf9142429c44f02c75dbc6c913ce00_003F1a_003F53ed0524_003FVector3_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	</wpf:ResourceDictionary>

+ 5 - 2
GameClient/ProjectSettings/ProjectSettings.asset

@@ -176,7 +176,7 @@ PlayerSettings:
   AndroidTargetSdkVersion: 0
   AndroidPreferredInstallLocation: 1
   aotOptions: 
-  stripEngineCode: 0
+  stripEngineCode: 1
   iPhoneStrippingLevel: 0
   iPhoneScriptCallOptimization: 0
   ForceInternetPermission: 0
@@ -419,7 +419,7 @@ PlayerSettings:
   - m_BuildTarget: AndroidPlayer
     m_GraphicsJobs: 0
   - m_BuildTarget: WebGLSupport
-    m_GraphicsJobs: 0
+    m_GraphicsJobs: 1
   m_BuildTargetGraphicsJobMode: []
   m_BuildTargetGraphicsAPIs:
   - m_BuildTarget: AndroidPlayer
@@ -428,6 +428,9 @@ PlayerSettings:
   - m_BuildTarget: iOSSupport
     m_APIs: 10000000
     m_Automatic: 1
+  - m_BuildTarget: WebGLSupport
+    m_APIs: 0b000000
+    m_Automatic: 0
   m_BuildTargetVRSettings: []
   openGLRequireES31: 0
   openGLRequireES31AEP: 0