https://docs.unity3d.com/ja/current/ScriptReference/EditorApplication-playModeStateChanged.html
これでデバッグログとか見てみれば?