UEditorEngine::IsPlayingSessionInEditor

Returns true if we are currently either PIE/SIE in the editor, false if we are not (even if we would start next tick).