public override float CellSize(ScrollViewCell cell)
        {
            BaseGenericCell genericCell = (BaseGenericCell)cell;
            float           offset      = LogConsoleSettings.GetTreeViewOffsetByLevel(level);
            bool            hasIcon     = !string.IsNullOrEmpty(icon);

            return(genericCell.GetPreferHeight(DisplayText, hasIcon, offset));
        }
        public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex)
        {
            BaseGenericCell cell = (BaseGenericCell)scrollView.CreateCell(CellIdentifier());

            cell.SetText(DisplayText);
            cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level));
            cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex));

            AssetConfig.SpriteInfo spriteInfo = config.GetSpriteInfo(icon);
            if (spriteInfo != null)
            {
                cell.SetIcon(spriteInfo.sprite);
                cell.SetIconColor(iconColor != Color.white ? iconColor : spriteInfo.color);
            }
            else
            {
                cell.SetIcon(null);
            }


            return(cell);
        }
        public override ScrollViewCell CreateCell(RecycleScrollView scrollView, AssetConfig config, int cellIndex)
        {
            string          cellId = resizable ? "GenericResizableCell" : "GenericCell";
            BaseGenericCell cell   = (BaseGenericCell)scrollView.CreateCell(cellId);

            cell.SetText(DisplayText);
            cell.SetHeaderOffset(LogConsoleSettings.GetTreeViewOffsetByLevel(level));
            cell.SetBackgroundColor(LogConsoleSettings.GetCellColor(cellIndex));

            AssetConfig.SpriteInfo spriteInfo = config.GetSpriteInfo((isExpanded || string.IsNullOrEmpty(iconClose)) ? icon : iconClose);
            if (spriteInfo != null)
            {
                cell.SetIcon(spriteInfo.sprite);
                cell.SetIconColor(iconColor != Color.white ? iconColor : spriteInfo.color);
            }
            else
            {
                cell.SetIcon(null);
            }

            return(cell);
        }