How to Disable Input on a Scene

Hello,
I am currently working on incorporating multiple scenes. I have one scene which is where all of the game things happen in it called gameScene. I have another scene which has a menu on it called missionScene. When I open missionScene I want to disable all input on gameScene. Is there a simple solution to this?
The input objects I’m using:

  • on-screen buttons through .setInteractive()
  • cursorKeys e.g. createCursorKeys
  • Pointer e.g. game.input.activePointer

The only thing I can think of about how to accomplish this is to destroy all the inputs and recreate them after missionScene is closed, but that does not account for on-screen buttons. The only way I can think of getting rid of onscreen buttons is through having some kind of sprite which has a very high depth value and blocks the user from touching anything behind it. I hope that there is a more elegant solution than this.
Thanks,
UltimateProGrammer

Pause or sleep missionScene. scene.switch() sleeps scenes.

The issue is that I’m not using scene.switch, I’m using:
this.game.scene.add('missionScene', MissionScene, true, { x: 400, y: 300 });
Sorry for not posting my code earlier.

I meant pause or sleep gameScene, sorry :see_no_evil:

this.scene.switch('mission')
// OR
this.scene.pause().launch('mission');

Thanks for the speedy reply. I will try this when I can.

That worked perfectly. For some reason, this.scene.resume isn’t working though. I tried to debug it using isVisible but no matter what it just returned null. I will get back to this thread if I figure out the solution or if I have further questions.

EDIT:
Well, the error came down to forgetting what the key of my scene was. :man_facepalming: Thanks for the help!