Editモードでの関数呼び出し順序を調べました。
毎フレーム呼ばれる関数は一部端折っちゃってます。
[ExecuteAlways]を付けてるモノビヘとエディタ
[ExecuteAlways]Editモードでの関数呼び出し順序
コンパイル時の動き
MonoBehaviour OnDisable
Editor OnDisable
MonoBehaviour OnValidate
MonoBehaviour OnEnable
Editor Reset
Editor Awake
Editor OnEnable
Editor CreateInspectorGUI
Editor OnInspectorGUI
オブジェクト選択
Editor Reset
Editor Awake
Editor OnEnable
Editor CreateInspectorGUI
Editor OnInspectorGUI
Editor OnInspectorGUI
Editor OnInspectorGUI
オブジェクト非選択
Editor OnDisable
Editor OnDestroy
ロック状態でのオブジェクト選択・非選択
Editor OnInspectorGUI
コンポーネント追加
MonoBehaviour Awake
MonoBehaviour OnEnable
MonoBehaviour OnValidate
Editor Reset
Editor Awake
Editor OnEnable
Editor OnInspectorGUI
Editor OnInspectorGUI
Editor OnInspectorGUI
MonoBehaviour Start
MonoBehaviour Update
Editor CreateInspectorGUI
Editor OnInspectorGUI
コンポーネント削除
MonoBehaviour OnDisable
MonoBehaviour OnDestroy
Editor OnDisable
Editor OnDestroy
EditorWindow
EditorWindow
開く
Window Reset
Window Awake
Window OnEnable
Window CreateGUI
Window OnFocus 何故か2回
Window OnGUI マウス操作などウィンドウ上で操作中に頻繁に
Window Update 毎フレーム
Window OnInspectorUpdate 0.1秒に1回
閉じる
Window OnLostFocus
Window OnDisable
Window OnDestroy
タブが隠れる
Window OnLostFocus
タブが再度現れる
Window OnFocus
Window Update 毎フレーム
Window OnInspectorUpdate 0.1秒に1回
開いたまま別のウィンドウにフォーカス
Window OnLostFocus
Window Update 毎フレーム
Window OnInspectorUpdate 0.1秒に1回
開いたまま別のウィンドウにフォーカスしていた状態から隠れる
Window OnFocus
Window OnLostFocus
イベント関数の実行順序 - Unity マニュアル がパっと見ワケわからないし載ってない部分もあったので。
モノビヘの実行順序を調べるコードをどなたかが書いてたのを参考・拡張したがリンクを失念。すみません。