DESKTOP-BGJIU14\ck 1 روز پیش
والد
کامیت
7e68f3d7ff
2فایلهای تغییر یافته به همراه31 افزوده شده و 7 حذف شده
  1. 29 7
      Assets/Scripts/GameUI/GameApplction.cs
  2. 2 0
      XiuXianGame.sln.DotSettings.user

+ 29 - 7
Assets/Scripts/GameUI/GameApplction.cs

@@ -1,6 +1,8 @@
+using System;
 using Core.AssetLoadTool.Asset;
 using Core.Audio;
 using Core.Language;
+using Core.Utility;
 using Excel2Json;
 using Fort23.Core;
 using Fort23.Mono;
@@ -26,7 +28,7 @@ using Utility.CTween;
 using Utility.UITool;
 
 
-public class GameApplction : IGameStart
+public class GameApplction : IGameStart, ILogSend
 {
     public static GameApplction gameApplction;
     public GameRuntimeConfig gameRuntimeConfig;
@@ -42,18 +44,19 @@ public class GameApplction : IGameStart
 
     private GameStartUIPanel gameStartUIPanel;
     private System.Action LoadFinish;
+
     public async void StartGame(LoadType LoadType, string h5Url, GameStartUIPanel gameStartUIPanel,
         System.Action LoadFinish)
     {
-        HotSyncContent.DownloadUI= gameStartUIPanel;
+        HotSyncContent.DownloadUI = gameStartUIPanel;
         this.LoadFinish = LoadFinish;
         gameApplction = this;
         Debug.Log("开始游戏逻辑");
-        Crasheye.SetIsBetaVersion( true);
-        Crasheye.SendScriptException("测试错误", "测试错误","ZH");
+        LogTool.LogSend = this;
+        Crasheye.SendScriptException("测试错误", "测试错误", "ZH");
         // UnityEngine.Screen.SetResolution(Screen.width);
         // GameUpdateAsset.Instance.Init(h5Url);
-       
+        Crasheye.SetRegisterLogFunction(UnityLogic);
         this.gameStartUIPanel = gameStartUIPanel;
         gameStartUIPanel.ShowMassge("开始加载资源");
         gameStartUIPanel.SetSlider(0);
@@ -64,12 +67,12 @@ public class GameApplction : IGameStart
         GameAssetUpdatePanel gameAssetUpdatePanel = new GameAssetUpdatePanel();
         gameAssetUpdatePanel.StartUpdateAsset(AssetUpdateFinish);
         // await InitGameApplication();
-       
 
 
         Debug.Log("初始化完成");
     }
 
+
     private async void AssetUpdateFinish()
     {
         Debug.Log("finish AssetUpdateFinish");
@@ -108,7 +111,8 @@ public class GameApplction : IGameStart
         gameStartUIPanel.ShowMassge("loadConfig");
         gameStartUIPanel.SetSlider(0.25f);
 
-        AssetHandle gameRuntimeAssetHandle=   await  AssetBundleLoadManager.Instance.LoadAssetAsyncTask<GameRuntimeConfig>("GameRuntimeConfig.asset");
+        AssetHandle gameRuntimeAssetHandle =
+            await AssetBundleLoadManager.Instance.LoadAssetAsyncTask<GameRuntimeConfig>("GameRuntimeConfig.asset");
         gameRuntimeConfig = gameRuntimeAssetHandle.AssetObject<GameRuntimeConfig>();
         await ConfigComponent.Instance.Preload();
         await AnimationCurveManager.Instance.Init();
@@ -273,4 +277,22 @@ public class GameApplction : IGameStart
             MarskPanel.ClosePanel();
         }
     }
+
+    public void SendError(string massge)
+    {
+        Crasheye.SendScriptException(massge, massge, "");
+    }
+
+    public void SendException(Exception e)
+    {
+        Crasheye.SendScriptException(e);
+    }
+
+    public void UnityLogic(string logString, string stackTrace, LogType type)
+    {
+        if (type == LogType.Error || type == LogType.Exception)
+        {
+            Crasheye.SendScriptException(logString, stackTrace, "");
+        }
+    }
 }

+ 2 - 0
XiuXianGame.sln.DotSettings.user

@@ -50,11 +50,13 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIStyle_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F56d039fe633a4adf8fb266a0b1797e6c17a000_003F0f_003F32e1f086_003FIStyle_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AJsonMapper_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fc7c8498c81c94b1b853dfc7fe4d8d7fbec00_003F05_003F3709212d_003FJsonMapper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALayerMask_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F6c_003F2226b399_003FLayerMask_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALibForAndroid_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F34534b32c7b2418885047c665a6216691600_003F6d_003F371e715f_003FLibForAndroid_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003Aline_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FUnityProject_003FTest_003FAssets_003FScripts_003FGameLogic_003Fline_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALinkedList_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb6b3a0ee69ba4fd1a67ca69a688cb6bb284000_003Fb0_003F81563a42_003FLinkedList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F3789ee403a53437cbb6b5d9ab6311f51573620_003F1a_003F8c5b5955_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003F5e_003F7396f990_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003Fc2_003Ff2299255_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ALogType_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F72_003Fad046b71_003FLogType_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMathf_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003Fec_003F349cf977_003FMathf_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMathf_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003Fc7_003Fab5bc30c_003FMathf_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMath_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb18a8b3398e74bca86895881dd02956c573648_003F8b_003F8699ce4e_003FMath_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>