Custom Inspector heritage

Hi!

I’m trying to create a custom Inspector for one of my Components. After sometime I was able to build a simple Inspector for what I need. Basically I have a base component who, other components extends from. The idea is to create a custom inspector to this base component, so all the other components who extend from this base component would have it too.
The issue is that, for some reason all the components who extends from the base component are not rendering the custom inspector, they are just rendering the properties defined in the base component (default behavior when no custom inspector is referenced) along with their own properties .
I would like to replicate the behavior that, for example, the cc.Sprite component has. When you create a component who extends from cc.Sprite, the component will render all the defined properties and also will render all the cc.Sprites properties using the cc.Sprite’s custom inspector.

Kind regards!

1 Like

I have just noticed that when you extends from cc.Sprite, it just print the properties of the Sprite (same behavior that I got with my custom Component) and is not using the custom inspector referenced in the cc.Sprite class.
This is probably a missing feature in Cocos Creator, it would be great to have this in the future.

1 Like