Example #1
0
        private static Rect AppendPropertyLabel(HierarchyPropertyLabel propertyLabel, GameObject target, Rect availableRect)
        {
            //prepare currently maintaind label
            propertyLabel.Prepare(target, availableRect);
            var rect = availableRect;

            rect.xMin = rect.xMax - propertyLabel.GetWidth();

            //draw hierarchy overlay background
            if (Event.current.type == EventType.Repaint)
            {
                Style.backgroundStyle.Draw(rect, false, false, false, false);
            }

            propertyLabel.OnGui(rect);
            return(rect);
        }
Example #2
0
        private static Rect AppendPropertyLabel(HierarchyPropertyLabel propertyLabel, GameObject target, Rect availableRect)
        {
            //prepare currently used property label
            if (propertyLabel.Prepare(target, availableRect, out var width))
            {
                availableRect.xMin = availableRect.xMax - width;
                //draw hierarchy overlay background
                if (Event.current.type == EventType.Repaint)
                {
                    Style.backgroundStyle.Draw(availableRect, false, false, false, false);
                }

                propertyLabel.OnGui(availableRect);
            }

            return(availableRect);
        }