Change where custom editor places a Field

When making a field with a custom editor, is there any way to change the order of variables in the inspector while still using base.ObInspectorGUI()

My code (inside an editor script)

public override void OnInspectorGUI() {
        base.OnInspectorGUI();
        MyScript myScript = target as MyScript;
        if (myScript.someBool) {
            myScript.intVariable = EditorGUILayout.IntField("Int Variable", myScript.intVariable);
        }
    }

However the IntField is at the bottom of the public variables from the original MyScirpt. while I would like the IntField to be below the SomeBool.
Thanks!

It is kind of a kludge, but this should work for you.
Create a function in the base called IntFieldInspectorGUI and put the editor code for IntField in there.
Then change the code you posted above to this…

public override void OnInspectorGUI() {
         base.OnInspectorGUI();
         MyScript myScript = target as MyScript;
         if (myScript.someBool) {
             myScript.intVariable = EditorGUILayout.IntField("Int Variable", myScript.intVariable);
         base.IntFieldInspectorGUI();
         }
     }

that should result in what you are trying to accomplish.

Hope this helps,
-Larry