UEngine::OnLostFocusPause is never called
UEngine::OnLostFocusPause is never getting called which means, in turn, AHUD::OnLostFocusPause is never called. We'd like to know when the game has lost focus so we can stop the game from running in the background.
We had tried to work around this using FViewport::IsForegroundWindow() but
Profiling showed that almost 5% of the game thread was being spent inside FSceneViewport::IsForegroundWindow() (or functions that it calls) - more than ticking all of our (hundreds of!) actors combined!
Still, that's getting away from the main point - that UEngine::OnLostFocusPause() isn't ever being called leaving us with no good way (that I know about) of knowing whether we've lost focus - or gained it again!
Follow this question
Once you sign in you will be able to subscribe for any updates here