Ejemplo n.º 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());
            }
        }
Ejemplo n.º 2
0
 protected abstract void EnableDrawerImpl(MightyComponent mightyComponent, T attribute);
Ejemplo n.º 3
0
 protected abstract void OnGUI(MightyComponent mightyComponent, Rect selectionRect, T attribute);
Ejemplo n.º 4
0
 protected abstract void OnHierarchyChanged(MightyComponent mightyComponent, T attribute);
Ejemplo n.º 5
0
 public void OnGUI(MightyComponent mightyComponent, Rect selectionRect, BaseHierarchyAttribute baseAttribute) =>
 OnGUI(mightyComponent, selectionRect, (T)baseAttribute);
Ejemplo n.º 6
0
 public void OnHierarchyChanged(MightyComponent mightyComponent, BaseHierarchyAttribute baseAttribute) =>
 OnHierarchyChanged(mightyComponent, (T)baseAttribute);