Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Custom Editor for inherited class

A topic by MauroAbidalCarrer created Jul 21, 2021 Views: 123 Replies: 3
Viewing posts 1 to 2

Hi, I'm having some troubles applying the custom editor on an inherited class.

I've tried this method: https://forum.unity.com/threads/using-custom-editor-for-an-inherited-class.93480...

I'm a doing something wrong?

(btw i've Ctrl+F the documentation with "inherit")

Developer

Hello!

I'm a bit confused at what you're trying to do, are you trying to make a custom editor for a class that inherits from Super Text Mesh?

Hi,

No, basically I have a class that inherits from STM without any added serialized field.

My question is, how can I apply the custom editor of STM to this child class.

Thanks for the support btw.

Developer

Hmm I'm not totally sure if this is supported, but int he past I remember using "[CustomEditor(typeof(ClassA),true)]" above the editor class to do this in my own projects. The "true" bit is supposed to enable a custom inspectors in child classes, but I think it has to be above the parent class. Try adding this to the header above SuperTextMesh's custom editor script in SuperTextMesh.cs, and I'll add it as a feature in the next update if it works.