Example #1
0
        private void FillPool()
        {
            for (int i = 0; i < m_logViewHistoryMax + 1; i++)
            {
                ObeliskLog log = Instantiate(m_obeliskLogPrefab);
                log.transform.SetParent(m_obeliskLogPoolContainer, false);

                m_obeliskLogPool.Enqueue(log);
            }
        }
Example #2
0
        private void AddLogViewHistory(ObeliskLog obeliskLog)
        {
            if (m_logViewHistory.Count >= m_logViewHistoryMax)
            {
                PoolLog(m_logViewHistory[0]);
                m_logViewHistory.RemoveAt(0);
            }

            m_logViewHistory.Add(obeliskLog);

            ResizeLogLayout();
        }
Example #3
0
        protected override void OnConsoleLogHistoryChanged()
        {
            base.OnConsoleLogHistoryChanged();

            ObeliskLog obeliskLog = m_obeliskLogPool.Dequeue();

            obeliskLog.transform.SetParent(m_logLayout, false);

            ConsoleLog consoleLog = Console.consoleHistory.LogGetLatest();

            obeliskLog.SetLog(ref consoleLog);

            AddLogViewHistory(obeliskLog);
        }
Example #4
0
 private void PoolLog(ObeliskLog obeliskLog)
 {
     obeliskLog.transform.SetParent(m_obeliskLogPoolContainer, false);
     m_obeliskLogPool.Enqueue(obeliskLog);
 }