- Home /
Custom Editor fields listed below script variables
This is purely a aesthetic question, but is there a way to force Custom Editor fields to appear first in the inspector, before public variables from the script it is attached to?
Right now I have something like this:
The popup/dropown fields for Personalidade, Humor, Visão and Cargo (meaning Personality, Humor, Vision and Position) are all created through a custom editor. Other variables such as boolean Memória (Memory) and string Arquétipo (Archetype) are created as public variables inside the IA script itself.
Is there a way to push the custom popups so they're listed before Memória and Arquétipo fields? Thanks!
Answer by vexe · May 11, 2014 at 08:46 AM
Yes you draw your custom inspector gui first, and then call base.OnInspectorGUI
afterwards.
override void OnInsepctorGUI()
{
// draw your custom editor, popups, etc.
base.OnInsepctorGUI();
}