예제 #1
0
 public void Awake()
 {
     if (_instance)
     {
         UnityEngine.Debug.LogError("There are more than 1 DebugConsoleGUI Object");
     }
     _instance = this;
     DontDestroyOnLoad(gameObject);
     this.messages = new List <DebugConsoleGUI.Message>();
     LogType[] logTypes = Enum.GetValues(typeof(LogType)).Cast <LogType>().ToArray();
     showLogType = new Dictionary <LogType, bool>();
     foreach (var type in logTypes)
     {
         showLogType.Add(type, true);
     }
     UnityEngine.Debug.unityLogger.filterLogType = LogType.Log;
     UnityEngine.Debug.unityLogger.logEnabled    = true;
 }
예제 #2
0
 public void OnDestroy()
 {
     UnityEngine.Debug.unityLogger.logEnabled = false;
     _instance = null;
 }