From f8ebc6dabe6d4d5ed32fc4322f0aa8ae6214311d Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期五, 17 五月 2019 21:05:51 +0800
Subject: [PATCH] Merge branch 'master' into ClientPreciousDungeon

---
 System/Debug/DebugUtility.cs |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

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

--
Gitblit v1.8.0