示例#1
0
        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);
                }
            }
        }
示例#2
0
        public static void RegisterComponent(EditorComponent component)
        {
            var attr = GetAttribute(component.GetType());

            if (attr != null)
            {
                foreach (var t in attr.Types)
                {
                    EditorWindowBase.RegisterComponent(t, component);
                }
            }
        }