yyl
2026-03-26 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7
Main/System/Debug/DebugUtility.cs
@@ -39,49 +39,53 @@
    public void Init()
    {
        isWhiteListAccount = false;
        if (VersionConfig.Get().debugVersion)
        VersionConfig.GetAsync().ContinueWith(config =>
        {
            debugAccount = true;
        }
        else
        {
            var parentDirectory = Directory.GetParent(Application.persistentDataPath);
            debugAccount = File.Exists(parentDirectory + "/Debug");
        }
        if (LocalSave.GetString("#@#BrancH") != string.Empty)
        {
            var branch = LocalSave.GetString("#@#BrancH");
            int tmpbranch;
            int.TryParse(LocalSave.GetString("#@#BrancH").Substring(1), out tmpbranch);
            if (branch.StartsWith("d") && tmpbranch != 0)
            if (config != null && config.debugVersion)
            {
                debugBranch = tmpbranch;
                debugAccount = true;
            }
            else if (branch.StartsWith("r") && tmpbranch != 0)
            {
                debugBranch = tmpbranch;
                debugAccount = false;
            }
        }
        if (debugAccount)
        {
            if (Application.isMobilePlatform)
            else
            {
                var parentDirectory = Directory.GetParent(Application.persistentDataPath);
                if (File.Exists(parentDirectory + "/Debug"))
                debugAccount = File.Exists(parentDirectory + "/Debug");
            }
            if (LocalSave.GetString("#@#BrancH") != string.Empty)
            {
                var branch = LocalSave.GetString("#@#BrancH");
                int tmpbranch;
                int.TryParse(LocalSave.GetString("#@#BrancH").Substring(1), out tmpbranch);
                if (branch.StartsWith("d") && tmpbranch != 0)
                {
                    var content = File.ReadAllText(parentDirectory + "/Debug");
                    if (!string.IsNullOrEmpty(content))
                    debugBranch = tmpbranch;
                    debugAccount = true;
                }
                else if (branch.StartsWith("r") && tmpbranch != 0)
                {
                    debugBranch = tmpbranch;
                    debugAccount = false;
                }
            }
            if (debugAccount)
            {
                if (Application.isMobilePlatform)
                {
                    var parentDirectory = Directory.GetParent(Application.persistentDataPath);
                    if (File.Exists(parentDirectory + "/Debug"))
                    {
                        var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
                        debugBranch = json.branch;
                        var content = File.ReadAllText(parentDirectory + "/Debug");
                        if (!string.IsNullOrEmpty(content))
                        {
                            var json = JsonMapper.ToObject<DebugBranch>(File.ReadAllText(parentDirectory + "/Debug"));
                            debugBranch = json.branch;
                        }
                    }
                }
            }
        }
        }).Forget();
    }