private void AddLogViewHistory(ObeliskLog obeliskLog) { if (_logViewHistory.Count >= _logViewHistoryMax) { PoolLog(_logViewHistory[0]); _logViewHistory.RemoveAt(0); } _logViewHistory.Add(obeliskLog); ResizeLogLayout(); _scrollRect.normalizedPosition = Vector2.zero; }
protected override void OnConsoleLogHistoryChanged() { base.OnConsoleLogHistoryChanged(); ObeliskLog obeliskLog = _obeliskLogPool.Dequeue(); obeliskLog.transform.SetParent(_logLayout, false); ConsoleLog consoleLog = Console.ConsoleHistory.LatestLog; obeliskLog.SetLog(ref consoleLog); AddLogViewHistory(obeliskLog); }
private void PoolLog(ObeliskLog obeliskLog) { obeliskLog.transform.SetParent(_obeliskLogPoolContainer, false); _obeliskLogPool.Enqueue(obeliskLog); }