| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | using LitJson; |
| | | using System.IO; |
| | | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using Snxxz.UI;
|
| | | using LitJson;
|
| | | using System.IO;
|
| | |
|
| | | public class DebugUtility : Singleton<DebugUtility>
|
| | | { |
| | | {
|
| | | const string url = "http://pub.game.2460web.com:11000/dbg_player/?";
|
| | |
|
| | | GameObject debugRoot;
|
| | |
|
| | | bool m_DebugAccount = false;
|
| | | public bool debugAccount {
|
| | | public bool debugAccount
|
| | | {
|
| | | get { return m_DebugAccount; }
|
| | | private set {
|
| | | private set
|
| | | {
|
| | | if (m_DebugAccount != value)
|
| | | {
|
| | | m_DebugAccount = value;
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | public int debugBranch = -1; |
| | | |
| | | }
|
| | |
|
| | | public int debugBranch = -1;
|
| | |
|
| | | public void Init()
|
| | | {
|
| | | if (VersionConfig.Get().debugVersion)
|
| | |
| | |
|
| | | if (debugAccount)
|
| | | {
|
| | | DebugEx.EnableLog = LocalSave.GetBool("DesignEnableLog", false);
|
| | | DebugEx.EnableLogWarning = LocalSave.GetBool("DesignEnableLogWarning", false);
|
| | | DebugEx.EnableLogError = LocalSave.GetBool("DesignEnableLogError", false);
|
| | | DebugEx.EnableLog = LocalSave.GetBool("DesignEnableLog", true);
|
| | | DebugEx.EnableLogWarning = LocalSave.GetBool("DesignEnableLogWarning", true);
|
| | | DebugEx.EnableLogError = LocalSave.GetBool("DesignEnableLogError", true);
|
| | | DebugEx.EnableNetLog = false;
|
| | | }
|
| | | else
|
| | |
| | | DebugEx.EnableLogError = false;
|
| | | DebugEx.EnableNetLog = false;
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void CreateDebugRoot()
|
| | | {
|
| | | if (debugRoot == null)
|
| | |
| | | MonoBehaviour.DontDestroyOnLoad(debugRoot);
|
| | | debugRoot.name = "UIRootDebug";
|
| | | }
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | public void RequestDebugAuthority(string _account)
|
| | | {
|
| | | debugAccount = false;
|
| | |
| | | tables["player"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
|
| | |
|
| | | HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType, 1, OnDebugAuthority);
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | private void OnDebugAuthority(bool _ok, string _result)
|
| | | {
|
| | | if (_ok)
|
| | |
| | | public static void SetLogNetAble(bool _able)
|
| | | {
|
| | | DebugEx.EnableNetLog = _able;
|
| | | } |
| | | |
| | | }
|
| | |
|
| | | struct DebugAuthority
|
| | | {
|
| | | public int dbg;
|
| | |
| | | public class DebugBranch
|
| | | {
|
| | | public int branch = -1;
|
| | | } |
| | | |
| | | } |
| | | }
|
| | |
|
| | | }
|