From a9be71cf5fc495f2df69c2f5b2f8910aa275877a Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Tue, 22 Dec 2020 10:02:21 +0800
Subject: [PATCH] 编辑器和win模式下开启GM面板

---
 Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs b/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs
index 5c1f606..dac059d 100644
--- a/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs
+++ b/Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs
@@ -62,21 +62,22 @@
     protected override void Awake()
     {
         base.Awake();
+
+        if (Application.platform == RuntimePlatform.WindowsEditor ||
+         Application.platform == RuntimePlatform.WindowsPlayer)
+        {
+            GameConfig.useSDK = false;
+            GMBtn.SetActive(true);
+        }
+        else
+        {
+            GMBtn.SetActive(false);
+        }
         //这里为了方便直接使用Endless2D
         GameObject root = GameObject.Find("ManagerRoot");
 
         if (root == null)
         {
-            if (Application.platform == RuntimePlatform.WindowsEditor ||
-           Application.platform == RuntimePlatform.WindowsPlayer)
-            {
-                GameConfig.useSDK = false;
-                GMBtn.SetActive(true);
-            }
-            else
-            {
-                GMBtn.SetActive(false);
-            }
 
             root = new GameObject("ManagerRoot");
 

--
Gitblit v1.9.1