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()); } }
protected abstract void EnableDrawerImpl(MightyComponent mightyComponent, T attribute);
protected abstract void OnGUI(MightyComponent mightyComponent, Rect selectionRect, T attribute);
protected abstract void OnHierarchyChanged(MightyComponent mightyComponent, T attribute);
public void OnGUI(MightyComponent mightyComponent, Rect selectionRect, BaseHierarchyAttribute baseAttribute) => OnGUI(mightyComponent, selectionRect, (T)baseAttribute);
public void OnHierarchyChanged(MightyComponent mightyComponent, BaseHierarchyAttribute baseAttribute) => OnHierarchyChanged(mightyComponent, (T)baseAttribute);