From 80ff3dcc47cb1795fb8c3c0d4869bd17228e099a Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期五, 17 五月 2019 19:00:41 +0800
Subject: [PATCH] 3335 天生debug包也支持切换分支

---
 System/Debug/DebugUtility.cs |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/System/Debug/DebugUtility.cs b/System/Debug/DebugUtility.cs
index bc0ae96..596b057 100644
--- a/System/Debug/DebugUtility.cs
+++ b/System/Debug/DebugUtility.cs
@@ -42,15 +42,16 @@
         {
             var parentDirectory = Directory.GetParent(Application.persistentDataPath);
             debugAccount = File.Exists(parentDirectory + "/Debug");
+        }
 
-            if (debugAccount)
+        if (debugAccount)
+        {
+            var parentDirectory = Directory.GetParent(Application.persistentDataPath);
+            var content = File.ReadAllText(parentDirectory + "/Debug");
+            if (!string.IsNullOrEmpty(content))
             {
-                var content = File.ReadAllText(parentDirectory + "/Debug");
-                if (!string.IsNullOrEmpty(content))
-                {
-                    var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
-                    debugBranch = json.branch;
-                }
+                var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
+                debugBranch = json.branch;
             }
         }
 

--
Gitblit v1.8.0