I recently discovered that WaitForEndOfFrame does not function properly when the Scene View is active, which has caused a lot of issues in my testing that wouldn’t have happened under normal circumstances.
As a result, I’ve been looking for some way to determine in my code whether Scene View is currently active instead of the Game View, but I haven’t been able to figure out how to achieve this. Any ideas?
What exactly do you mean by active? Having keyboard focus or being visible? Keep in mind you can have more than one sceneview / gameview open at the same time. You can also undock the gameview so it’s always visible. The Unity Editor consists of several seperate EditorWindows and the Game / Scene view are just one type of EditorWindows. The Console, Inspector, Animation Window, … are also EditorWindows which could be active / have keyboard focus. So maybe you should just make sure your gameview is visible at all times. You can undock or dock the windows any way you link.