private void HandleLogMessageClicked(LogMessageEntry entry)
        {
            if (m_selectedMessage != null)
            {
                m_selectedMessage.OnDeselected();
                m_stackTraceField.text = null;
            }

            m_sendErrorButton.gameObject.SetActive(entry.LogLevel == LogLevel.Error);
            m_selectedMessage = entry;
            m_selectedMessage.OnSelected();
            m_stackTraceField.text = m_selectedMessage.StackTrace;
        }
        private void Awake()
        {
            m_stackTraceLayout  = m_stackTracePanel.GetComponent <LayoutElement>();
            m_stackTranceParent = m_stackTracePanel.parent as RectTransform;
            m_canvasGroup       = m_panel.GetComponent <CanvasGroup>();
            m_messages          = new LinkedList <LogMessageEntry>();
            m_selectedMessage   = null;
            foreach (var filter in m_filters)
            {
                filter.Changed += HandleMessageFilterChanged;
            }

            m_sendErrorButton.gameObject.SetActive(false);
            m_defaultStackTraceHeight = m_stackTraceLayout.preferredHeight;
            LoadLayoutChanges();
        }
        private void ApplyFilters(LogMessageEntry entry)
        {
            bool isOn = false;

            foreach (var filter in m_filters)
            {
                if (filter.LogLevel == entry.LogLevel)
                {
                    filter.MessageCount++;
                    isOn = filter.IsOn;
                    break;
                }
            }

            entry.gameObject.SetActive(isOn);
        }
        private void CreateMessageEntry(LogMessage logMessage)
        {
            GameObject entryGO = GameObject.Instantiate <GameObject>(m_logMessageTemplate);

            entryGO.SetActive(true);
            entryGO.transform.SetParent(m_logMessageRoot, false);
            entryGO.transform.SetAsLastSibling();

            LogMessageEntry entry = entryGO.GetComponent <LogMessageEntry>();

            entry.SetMessage(logMessage);
            entry.Clicked += HandleLogMessageClicked;
            entry.UserAlternateBackground = m_messages.Count > 0 ? !m_messages.Last.Value.UserAlternateBackground : false;
            m_messages.AddLast(entry);
            ApplyFilters(entry);
        }