public AbstractEditorComponent(Rect rect, GUIContent content, GUIStyle style, params GUILayoutOption[] options) : base(rect, content, style, options) { var attr = Attribute; if (attr != null) { foreach (var t in attr.Types) { EditorWindowBase.RegisterComponent(t, this); } } }
public static void RegisterComponent(EditorComponent component) { var attr = GetAttribute(component.GetType()); if (attr != null) { foreach (var t in attr.Types) { EditorWindowBase.RegisterComponent(t, component); } } }