private static void ItemOnGUI(int instanceid, Rect selectionrect)
        {
            Object obj = EditorUtility.InstanceIDToObject(instanceid);

            if (obj == null)
            {
                return;
            }

            GameObject gameObject = obj as GameObject;

            if (gameObject == null)
            {
                return;
            }

            HierarchyProShouldDrawItemEventArgs e = HierarchyPro.OnShouldDrawItem(gameObject, selectionrect);

            if (e.Cancel)
            {
                return;
            }

            HierarchyProEditorCache.Draw(gameObject, selectionrect);
        }
Ejemplo n.º 2
0
        public static HierarchyProShouldDrawItemEventArgs OnShouldDrawItem(GameObject gameObject, Rect rect)
        {
            HierarchyProShouldDrawItemDelegate  handler = HierarchyPro.ShouldDrawItem;
            HierarchyProShouldDrawItemEventArgs e       = new HierarchyProShouldDrawItemEventArgs(gameObject, rect);

            if (handler != null)
            {
                handler(null, e);
            }
            return(e);
        }