Question by
yruama69 · Jun 21, 2017 at 08:49 PM ·
editorscript.editor-scriptingchild
How to see variables of child class with custom editor
Hello.
Imagine i have a parent class and several Child class. Each Child class have unique variables.
My parent class have a customeditor : [CustomEditor(typeof(ParentClass), true)]
How can i see variable of my Child class ?
Thanks !
Comment
The only thing I can think of is GetComponent in your custom editor OnInspectorGUI or OnEnable on the casted target, checking for null if it exists and if so grabbing it's variables like you would with the inspected classes variables.
I don't think it's possible to write custom editors that automatically merge hierarchical classes info in the inspector.