We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63d6662 commit 8469db6Copy full SHA for 8469db6
src/com.unity.git.ui/UI/ApplicationManager.cs
@@ -52,8 +52,15 @@ protected override void InitializationComplete()
52
private void ListenToUnityExit()
53
{
54
EditorApplicationQuit = (UnityAction)Delegate.Combine(EditorApplicationQuit, new UnityAction(Dispose));
55
+
56
+ // clean up when entering play mode
57
+#if UNITY_2017_2_OR_NEWER
58
+ EditorApplication.playModeStateChanged += change => {
59
+ if (change == PlayModeStateChange.EnteredPlayMode)
60
+#else
61
EditorApplication.playmodeStateChanged += () => {
62
if (EditorApplication.isPlayingOrWillChangePlaymode && !EditorApplication.isPlaying)
63
+#endif
64
65
Dispose();
66
}
0 commit comments