Draw custom Property Field in Custom Editor

I’ve got custom property drawer for MyEnum.
In CustomEditor I need to get new MyEnum value via this custom property drawer.

so, basically, I need something like this:

public override void OnInspectorGUI()
{
    ...
    MyEnum myEnum = MyEnum.DefaultValue;
    myEnum = EditorGUILayout.PropertyField(typeof(MyEnum), myEnum); // ?
    if (myEnum != MyEnum.DefaultValie) { ... }
}

but I know how to draw default inspector only for Serialized Property of specific Serialized Object…
Is it possible to draw default inspector for standaline value?

Thanks

So, Im using this as my way atm. I am very new to editor scripting though, so there may be a better version.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

[CustomEditor(typeof(NPC))]
public class NPCEditor : Editor {

public override void OnInspectorGUI () {
	var npc = target as NPC;

	npc.npc_type = (NPC.npcType)(EditorGUILayout.EnumPopup ("NPC Type", npc.npc_type));

	if (npc.npc_type == NPC.npcType.Base) {

	} else if (npc.npc_type == NPC.npcType.Advanced) {
		
	} else if (npc.npc_type == NPC.npcType.Quest) {
		
	}
}

}