/Engine/Source/Runtime/Core/Public/Misc/App.h
Returns true if a normal or PIE game is active (basically !GIsEdit or || GIsPlayInEditorWorld) This must NOT be accessed on threads other than the game thread! Use View->Family->EnginShowFlags.Game on the rendering thread.
true if the application is a game, false otherwise.
static bool IsGame()