public bool IsVisible() { LevelMetricsTreeElement parent = (LevelMetricsTreeElement)this.parent; if (parent != null) { return(visible && parent.IsVisible()); } else { return(visible); } }
private void CellGUI(Rect rowRect, LevelMetricsTreeElement item, ref RowGUIArgs args) { CenterRectUsingSingleLineHeight(ref rowRect); Rect toggleRect = new Rect(rowRect); toggleRect.x += GetContentIndent(item) - 14; toggleRect.width = 30; if (toggleRect.xMax < rowRect.xMax) { item.visible = EditorGUI.Toggle(toggleRect, item.visible); } rowRect.x += 20; args.rowRect = rowRect; GUI.enabled = item.IsVisible(); base.RowGUI(args); GUI.enabled = true; }