瀏覽代碼

屏蔽debug浮窗的默认显示,使用F12键召唤

大爷 1 年之前
父節點
當前提交
6223710f07

+ 16 - 0
Unity/Assets/Scenes/Init.unity

@@ -165,6 +165,10 @@ PrefabInstance:
       propertyPath: m_Name
       value: IngameDebugConsole
       objectReference: {fileID: 0}
+    - target: {fileID: 132536, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
+      propertyPath: m_IsActive
+      value: 1
+      objectReference: {fileID: 0}
     - target: {fileID: 178532, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
       propertyPath: m_IsActive
       value: 1
@@ -185,10 +189,22 @@ PrefabInstance:
       propertyPath: m_ReferenceResolution.y
       value: 900
       objectReference: {fileID: 0}
+    - target: {fileID: 11452418, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
+      propertyPath: toggleKey
+      value: 293
+      objectReference: {fileID: 0}
     - target: {fileID: 11452418, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
       propertyPath: enablePopup
+      value: 0
+      objectReference: {fileID: 0}
+    - target: {fileID: 11452418, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
+      propertyPath: startMinimized
       value: 1
       objectReference: {fileID: 0}
+    - target: {fileID: 11452418, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
+      propertyPath: startInPopupMode
+      value: 0
+      objectReference: {fileID: 0}
     - target: {fileID: 22331464, guid: 67117722a812a2e46ab8cb8eafbf5f5e, type: 3}
       propertyPath: m_AdditionalShaderChannelsFlag
       value: 0

+ 6 - 3
Unity/Assets/Scripts/Codes/Hotfix/Client/battle/BattleMgr_Cmd.cs

@@ -15,6 +15,10 @@ namespace ET
     {
         protected override async ETTask OnEvent(BattleFunc a)
         {
+            if(PlayerComponent.Instance == null || PlayerComponent.Instance.ClientScene() == null || PlayerComponent.Instance.ClientScene().GetComponent<SessionComponent>() == null)
+            {
+                return;
+            }
             Log.Debug($"Battle Func:{a.FuncIndex}");
 
             var session = PlayerComponent.Instance.ClientScene().GetComponent<SessionComponent>().Session;
@@ -135,9 +139,7 @@ namespace ET
                 case (int)KeyCode.F11:
                     EventSystem.Instance.Publish(ShowVipName.Clone(8));
                     break;
-                case (int)KeyCode.F12:
-                    EventSystem.Instance.Publish(TiktokGiftEvent.Clone(1, 13, "额滴个马", ""));
-                    break;
+                
             }
             await ETTask.CompletedTask;
 
@@ -192,6 +194,7 @@ namespace ET
             {
                 BattleFuncHandler.BattleCenterIndex = 2;
             }
+            await ETTask.CompletedTask;
         }
     }
 

+ 1 - 7
Unity/Assets/Scripts/Loader/MonoBehaviour/Init.cs

@@ -9,12 +9,6 @@ namespace ET
 		private void Awake()
 		{
 #if UNITY_EDITOR
-			//Editor模式下去掉debug浮窗插件
-			var debugObj = GameObject.Find("IngameDebugConsole");
-            if (debugObj != null)
-            {
-                GameObject.Destroy(debugObj);
-            }
             var globalConfig = Resources.Load<GlobalConfig>("GlobalConfig");
             if (globalConfig.PlayMode != YooAsset.YooAssets.EPlayMode.EditorSimulateMode)
             {
@@ -35,7 +29,7 @@ namespace ET
 			{
 				Log.Error(e.ExceptionObject.ToString());
 			};
-				
+				 
 			Game.AddSingleton<MainThreadSynchronizationContext>();
 
 			// 命令行参数