Example #1
0
        public static void CacheHierarchyForType(this MightyComponent component, Type type,
                                                 IEnumerable <BaseMightyAttribute> wrappedAttributes)
        {
            var hierarchyAttributes = new List <BaseHierarchyAttribute>();

            var any = PopulateAttributesList(hierarchyAttributes, type.GetCustomAttributes <BaseHierarchyAttribute>(true));

            any = PopulateAttributesList(hierarchyAttributes, wrappedAttributes) || any;

            if (any)
            {
                component.SetAttributes(hierarchyAttributes.ToArray());
            }
        }
Example #2
0
 protected abstract void EnableDrawerImpl(MightyComponent mightyComponent, T attribute);
Example #3
0
 protected abstract void OnGUI(MightyComponent mightyComponent, Rect selectionRect, T attribute);
Example #4
0
 protected abstract void OnHierarchyChanged(MightyComponent mightyComponent, T attribute);
Example #5
0
 public void OnGUI(MightyComponent mightyComponent, Rect selectionRect, BaseHierarchyAttribute baseAttribute) =>
 OnGUI(mightyComponent, selectionRect, (T)baseAttribute);
Example #6
0
 public void OnHierarchyChanged(MightyComponent mightyComponent, BaseHierarchyAttribute baseAttribute) =>
 OnHierarchyChanged(mightyComponent, (T)baseAttribute);