private void DrawItem(Rect rect, HierarchyEntityGroupGraph item, RowGUIArgs args) { if (null == item) { return; } var indent = GetContentIndent(item); if (!args.selected) { var headerRect = rect; headerRect.width += 1; var topLine = headerRect; topLine.height = 1; UTinyGUI.BackgroundColor(topLine, UTinyColors.Hierarchy.SceneSeparator); headerRect.y += 2; UTinyGUI.BackgroundColor(headerRect, UTinyColors.Hierarchy.SceneItem); var bottomLine = headerRect; bottomLine.y += bottomLine.height - 1; bottomLine.height = 1; UTinyGUI.BackgroundColor(bottomLine, UTinyColors.Hierarchy.SceneSeparator); } rect.y += 2; rect.x = indent; rect.width -= indent; var iconRect = rect; iconRect.width = 20; var image = ActiveScene.Equals(item.Value.EntityGroupRef) ? UTinyIcons.ActiveEntityGroup : UTinyIcons.EntityGroup; EditorGUI.LabelField(iconRect, new GUIContent { image = image }); rect.x += 20; rect.width -= 40; item.displayName = item.Value.EntityGroupRef.Dereference(Registry).Name; var style = ActiveScene.Equals(item.Value.EntityGroupRef) ? EditorStyles.boldLabel : GUI.skin.label; EditorGUI.LabelField(rect, item.displayName, style); rect.x += rect.width; rect.width = 16; rect.y = rect.center.y - 5.5f; rect.height = 11; if (GUI.Button(rect, GUIContent.none, UTinyStyles.PaneOptionStyle)) { HierarchyContextMenus.ShowEntityGroupContextMenu(this, item.Value.EntityGroupRef); } }