Ejemplo n.º 1
0
        public override void Dispose()
        {
            if (mLog != null)
            {
                mLog.Dispose();
                mLog = null;
            }

            if (mLogWarning != null)
            {
                mLogWarning.Dispose();
                mLogWarning = null;
            }

            if (mLogError != null)
            {
                mLogError.Dispose();
                mLogError = null;
            }

            if (mLogException != null)
            {
                mLogException.Dispose();
                mLogException = null;
            }
        }
Ejemplo n.º 2
0
        protected override void DrawWindow(int id)
        {
            GUILayout.BeginHorizontal();
            try
            {
                string msg = string.Empty;
                TLog   log = GetCurrentLog();
                if (log != null)
                {
                    if (log.Count <= log.MaxShowLine)
                    {
                        for (int i = 0; i < log.Count; i++)
                        {
                            msg = i == 0 ? log.Messages[i] : msg + "\n" + log.Messages[i];
                        }
                    }
                    else
                    {
                        for (int i = log.MessageLine - log.MaxShowLine; i < log.Count; i++)
                        {
                            msg = i == (log.MessageLine - log.MaxShowLine) ? log.Messages[i] : msg + "\n" + log.Messages[i];
                        }
                    }
                }

                GUI.Label(new Rect(5, 15, 400, 450), msg);
            }
            catch (System.Exception e)
            {
                Debug.Log(e.Message);
            }
            GUILayout.EndHorizontal();
            GUI.DragWindow();
        }
Ejemplo n.º 3
0
 public MsgWindow(int id, string title, Rect rect, bool enabled) : base(id, title, rect, enabled)
 {
     mLog          = new TLog();
     mLogWarning   = new TLog();
     mLogError     = new TLog();
     mLogException = new TLog();
 }