← Yop2D

How to make a button that changes scene?

Beginner guide · no code

Français · English · Español · Deutsch · Italiano · Português · Русский · 中文 · 日本語 · العربية

ℹ️ For Yop2D Next, the new 2D + 3D version of Yop2D (coming soon). Button and node names are those of Yop2D Next.

🔍 How do I…? All short recipes, with a search

A menu screen with a Play button that opens the game scene. A scene = one screen of your game (menu, level 1, ending…).

You need:

Step 1: two scenes

  1. In the left panel, Scene tab, SCENES section: the first scene in the list (★) is where the game starts. It will be the menu.
  2. Tap New scene and call it Game. Put whatever you like in it (a background, a character…).
👉 When you tap New scene, Yop2D asks 2D or 3D: choose 2D scene.

Step 2: the button

  1. Tap the first scene in the list to go back to the menu.
  2. Tap Object → Interactive → Button with text, in the middle of the screen.
  3. Name it play and type Play in its Text line.

Step 3: the nodes

  1. Open the Blueprint (the one of the menu scene).
  2. On Object Click: Object play.
  3. Go to scene: Scene Game.
  4. Connect the two nodes.

The nodes

On Object Clickplay
→
Go to sceneGame

Try it

From the menu scene, tap Play, then the game's Play button: the Game scene opens.

⚠️ Each scene has its own Blueprint: the button's nodes go in the Blueprint of the scene that contains the button (the menu).
👉 For an effect (circle, star, curtain…): use Go to scene with a transition instead.