Exemplo n.º 1
0
        internal static void CreateAllowedHierarchyContentCallbacks(params HierarchyObjectDataType[] items)
        {
            foreach (var item in items)
            {
                var propertyLabel = HierarchyPropertyLabel.GetPropertyLabel(item);
                if (propertyLabel == null)
                {
                    continue;
                }

                allowedDrawers.Add(propertyLabel);
            }
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
        }