- Home /
Question by
Mogart · Feb 22, 2013 at 10:31 AM ·
customeditorscripteditorheritage
How to make a CustomEditor match herited class
Hi ! If for example I have a class named "Animal" and some class like "dog" and "cat" all in different scripts as : public class Animal : Monobehavior { void Update(){} } public class Cat : Animal { void Update(){} } public class Dog : Animal { void Update(){} } How can I write an only one script editor matching all these class ? I still don't know how many class will inherit from Animal.
[CustomEditor(typeof(Animal))]
This only match the class Animal. Thank you
Comment