- Home /
Question by
Dani · Apr 14, 2011 at 02:47 PM ·
custom-inspector
Custom editor few derived types
How can I have a custom inspector apply to several types? they all derive from the same base but that didn't seem to help...
[CustomEditor(typeof(Base))]
class BaseEditor
Applied to the base but to none of the derived types.
[CustomEditor(typeof(Base))]
[CustomEditor(typeof(Derived1))]
[CustomEditor(typeof(Derived2))]
class BaseEditor
Didn't even compile...
Comment
Best Answer
Answer by hololabs · Sep 27, 2013 at 03:56 PM
You would need to make three custom editors independently, or you can include a base class editor in derived classes using:
[CustomEditor(typeof(Base), true)]
The "true" tells the custom editor to be used for derived classes.
Your answer
Follow this Question
Related Questions
Custom Editor (lack of) Polymorphism 6 Answers
CustomEditor show an instance of a Class inside a Class 0 Answers
Inspector top not working properly 0 Answers
Animation field in custom inspector. 1 Answer