private void OnMessageRemoved(RuntimeConsole console, ConsoleLogEntry[] arg) { bool scroll = false; if (m_scrollRect.Index + m_scrollRect.VisibleItemsCount == m_scrollRect.ItemsCount) { scroll = true; } DataBind(); if (scroll) { m_scrollRect.verticalNormalizedPosition = 0; } }
private void OnMessageAdded(RuntimeConsole console, ConsoleLogEntry logEntry) { bool scroll = false; if (m_scrollRect.Index + m_scrollRect.VisibleItemsCount == m_scrollRect.ItemsCount) { scroll = true; } if (CanAdd(logEntry.LogType)) { m_treeView.Add(logEntry); } UpdateCounters(); if (scroll) { m_scrollRect.verticalNormalizedPosition = 0; } }