コード例 #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);
            }
        }
コード例 #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();
        }
コード例 #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);
        }
コード例 #4
0
 private void PoolLog(ObeliskLog obeliskLog)
 {
     obeliskLog.transform.SetParent(m_obeliskLogPoolContainer, false);
     m_obeliskLogPool.Enqueue(obeliskLog);
 }