override protected void DoItemGUI(Rect rect, int row, TreeViewItem item, bool selected, bool focused, bool useBoldFont)
        {
            GameObjectTreeViewItem goItem = item as GameObjectTreeViewItem;

            if (goItem == null)
            {
                return;
            }

            EnsureLazyInitialization(goItem);

            if (goItem.isSceneHeader)
            {
                useBoldFont = (goItem.scene == SceneManager.GetActiveScene());
            }

            base.DoItemGUI(rect, row, item, selected, focused, useBoldFont);
            SceneVisibilityHierarchyGUI.DoItemGUI(rect, goItem, selected && !IsRenaming(item.id), m_TreeView.hoveredItem == goItem, focused, isDragging);
        }
Ejemplo n.º 2
0
        override protected void DoItemGUI(Rect rect, int row, TreeViewItem item, bool selected, bool focused, bool useBoldFont)
        {
            GameObjectTreeViewItem goItem = item as GameObjectTreeViewItem;

            if (goItem == null)
            {
                return;
            }

            EnsureLazyInitialization(goItem);

            if (goItem.isSceneHeader)
            {
                useBoldFont = (goItem.scene == SceneManager.GetActiveScene()) || IsPrefabStageHeader(goItem);
            }

            SceneVisibilityHierarchyGUI.DoItemGUI(rect, goItem, selected && !IsRenaming(item.id), m_TreeView.hoveredItem == goItem, focused, isDragging);

            rect.xMin += SceneVisibilityHierarchyGUI.utilityBarWidth;

            base.DoItemGUI(rect, row, item, selected, focused, useBoldFont);

            if (goItem.isSceneHeader)
            {
                DoAdditionalSceneHeaderGUI(goItem, rect);
            }
            else
            {
                PrefabModeButton(goItem, rect);
                if (SubSceneGUI.IsUsingSubScenes() && !showingSearchResults)
                {
                    SubSceneGUI.DrawVerticalLine(rect, (GameObject)goItem.objectPPTR);
                }
            }

            if (SceneHierarchy.s_Debug)
            {
                GUI.Label(new Rect(rect.xMax - 70, rect.y, 70, rect.height), "" + row + " (" + goItem.id + ")", EditorStyles.boldLabel);
            }
        }