- Home /
Child Class Inspector Issues
I am trying to show my child class in the inspector. It is set up as, for example, "Item" as a base class, and "Weapon", "Armor" as child classes. I used [CutsomEditor(typeof(Weapon))] and the same for armor, and the proper fields are showing in the inspector. But when I try to fill the fields, when I click the circle with a dot, it doesn't show any assets. This only happens with the derived classes. What am I missing?
Interaction Class is serialized
are your classes marked as serializable (more specifically, [System.Serializable] for any class that doesn't inherit from a unity object, iirc)? In any case, post the code if you would.
Well, I don't see anything wrong with that. I suppose its just another limitation of the inspector...in which case you'd have to use the base class to reference things in the inspector, or some sort of editor per-derived class (say, a custom property drawer).