Hi all,
my question is easier to understand than it is to explain.
I basically have two classes
public class myfirstclass : MonoBehaviour {
public SortedList<int, transform> mylist;
}
public class mysecondclass : myfirstclass {
Transform mytransform;
}
Now, I have a custom editor for myfirstclass:
[CustomEditor (typeof(myfirstclass))]
public class myfirstclass: Editor {
private myfirstclass element;
void Awake () {
element = (myfirstclass)target;
}
public override void OnInspectorGUI() {
EditorGUILayout.LabelField("wdf");
DrawDefaultInspector();
}
}
This basically works whenever I drag myfirstclass in any gameobject, but If I assign mysecondclass to a gameobject, the custom editor part is not drawn for it, and it’ll just be presented as it would without editor.
I am here hoping that we can in some way call a parent class editor class, like for example we do with the “base” keyword in the Awake function.
It’d sound very stupid and ridiculous if we had to completely rewrite an editor class completely disregarding inheritance.