public override void OnInspectorGUI() { base.OnInspectorGUI(); ItemComponent targ = target as ItemComponent; EItemState newValue = (EItemState)EditorGUILayout.EnumPopup(targ.state); if (newValue != targ.state) { targ.state = newValue; targ.SetObjectProperties(); // do stuff, call functions, etc. } }