Steps to reproduce:
1. Change Game View to Play Unfocused
2. Focus game view by clicking into it
3. Enter Play Mode with Game View focused
4. Note that Game View will be unfocused
5. Exit Play Mode, and pop the snippet in Notes into a new class
6. Focus back into Game View and hit Play
Actual results:
Game View remains unfocused, even when the progress bar disappears
Expected results:
Game View is refocused
Reproducible with versions:
6000.1.0a5
Not reproducible with versions:
Can't test with versions:
Tested on (OS):
Apple M2 Max MacBook Pro (32GB system memory, 12 core CPU) running macOS 15.1
Notes:
- This can impact users who might need to test if the Editor is unfocused
- The workaround is for users to select another part of the Editor's UI before entering play mode - e.g focusing the Inspector
- This is a bug, as per [Internal link]
Repro Snippet
[InitializeOnLoadMethod]
private static void PlayModeRefocusRepro()
{{{}}
EditorApplication.playModeStateChanged += change =>
{{{}}
if (change == PlayModeStateChange.EnteredPlayMode)
{{
{ EditorUtility.DisplayProgressBar("foo", "bar", 0.0f); System.Threading.Thread.Sleep(10); EditorUtility.ClearProgressBar(); }
}}
};
}