Table of Contents

menu.gif

Full Example

In the main scene, add the following directly to the scene:

Untitled

Untitled

Lastly, in the menu scene, add the following directly to the scene:

Untitled

Untitled

Instructions

How to: Make a button to go to Menu

  1. Create an image of your menu in Paint/Photoshop.

Screenshot 2023-07-01 at 10.44.53 AM.png

  1. Click on the scene where you want to add a menu.

Untitled

  1. Add an event called 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.

Untitled

  1. Under 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:
    1. Store Current Scene on Stack - This creates a stack of scenes
    2. Change Scene - When you press the button, it will change the scene to your Menu scene. Choose your Menu scene from the dropdown.

Untitled

How to: Go back from Menu Scene

  1. Choose your menu scene.

Untitled

  1. Directly in your scene, Add event called Deactivate Actor and then choose your player. We do this so that the player does not show up in the menu scene.

Untitled

  1. Add event called 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!

Untitled

menu.gif