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...

1 Answer

1

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.