In the main scene, add the following directly to the scene:
Lastly, in the menu scene, add the following directly to the scene:
Joypad Input: Attach Script to Button
. Choose the button you want to access the Menu (For example, the Start button (Enter) or Select button (Shift). Here we are using the Select button.Joypad Input: Attach Script to Button
, you’ll see a thing called “On Press”. This means every time you press that button, things will happen. Click on Add Event. Add the following two events:
Store Current Scene on Stack
- This creates a stack of scenesChange Scene
- When you press the button, it will change the scene to your Menu scene. Choose your Menu scene from the dropdown.Deactivate Actor
and then choose your player. We do this so that the player does not show up in the menu scene.Pause Script Until Input Pressed
. Lastly, add an event called Restore Previous Scene from Stack
. This allows you to press any button and it will take you back to the previous scene!