Pressing the pause button a game controller takes me out of my game, instead of pausing it

I'm trying to make an existing game for iOS work on tvOS. For this, I've change the superclass of a viewController that I could re-use to be of type GCEventViewControlller (instead of UIVIewcontroller). My game gets all input from the GCController. The pause button however does execute my handler, but ALSO takes the me to the previous viewcontroller (doing what the Apple remote's Menu button does).


So the docs say:

"All controllers include a pause button. When gameplay is active, pressing the pause button should pause gameplay. When the game is not being played, such as when you are at a menu screen, the pause button moves to a previous screen of content."


Do I need to indicate to the system what to do (i.e. when gameplay is active, and the pause handler should be triggered, and when gameplay is inactive and the menu-action should be invoked), and if so, how do I do this?

I have the same problem. How can I prevent the current view to be dismissed when the 'menu' button is pressed?

I can get the event to be handled with controller.controllerPausedHandler but the view/scene is dismissed and I have no way to implement the pause functionallity within my game.

If you inherit from GCEventViewController, you can set the controllerUserInteractionEnabled flag to true if you want the events to be routed through the normal responder chain, and false if you want it to send you all the events. When it is true, the menu button will exit the app -- it's the only way that I know of allowing the user to explicitly exit from your app (i.e. if you never set the flag to true, I think menu would never trigger an exit from your app). There's always the Home button, though, which should exit no matter what, and which we have no way of tapping into. Seems funny to me that there are so many buttons whose sole function is just to exit out of your app.


All that being said, though, I'm having trouble when I toggle that flag -- even when set to true, it's still calling the button handlers for my underlying game handlers, which is causing some issues...

I'm not 100% sure if this will help, but I wrote up a thread explaining the issue I was having and how I worked around it:


https://forums.developer.apple.com/thread/23803


-Phil

I am also experiencing this, when I have controllerUserInteractionEnabled set to false it still exits my app.

Pressing the pause button a game controller takes me out of my game, instead of pausing it
 
 
Q