If I add a custom editor to a class, it shows after any public fields of that class. is there a way of having it show before them?
thanks the dropdown appears at the end of the list - I would like it before the list of integer fields The code I'm currently using... Code (CSharp): public class MyClass: MonoBehaviour{ [HideInInpector] public string choice; // this is the target of my dropdown public int a, b, c, etc; // blah } [CustomEditor(typeof(MyClass))] public class SomeEditor : Editor { List<string> _choices = new List<string>(); int _choiceIndex; // this all works fine, my issue is only about positioning public override void OnInspectorGUI() { PopulateList(); // calls some function that populates my list to form the dropdown // Draw the default inspector DrawDefaultInspector(); var myClass = target as MyClass; _choiceIndex = _choices.IndexOf(myClass .choice); if (_choiceIndex < 0) _choiceIndex = 0; _choiceIndex = EditorGUILayout.Popup(_choiceIndex, _choices.ToArray()); myClass .choice = _choices[_choiceIndex]; // create an undo possibilty EditorUtility.SetDirty(target); } } BTW, I'm using this approach as I need to be able to populate the dropdown menu dynamically, so I can't use an enum.