← Yop2D

How to make a settings screen?

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 Settings button on the title screen opens a settings scene: a switch for the music and a Back button.

You need:

Step 1: the settings scene

  1. Left panel, Scene tab, SCENES section: tap New scene, choose 2D scene and call it Settings.

Step 2: what's inside

  1. Add the music switch from the An ON / OFF switch recipe (or a volume from the A slider and its value recipe).

Step 3: the Back button

  1. Tap Object → Interactive → Button with text.
  2. Name it retour and type Back in its Text line.
  3. Open the Blueprint.
  4. On Object Click: Object retour → Go to scene: Scene Title

Step 4: the Settings button

  1. Open the title scene (see the A title screen recipe).
  2. Tap Object → Interactive → Button with text.
  3. Name it reglages and type Settings in its Text line.
  4. Open the Blueprint.
  5. On Object Click: Object reglages → Go to scene: Scene Settings

The nodes

On Object Clickreglages
→
Go to sceneSettings
On Object Clickretour
→
Go to sceneTitle

Try it

Tap Play, then Settings: the settings screen opens. Tap Back: you go back to the title.

👉 The setting is kept in a game variable: it stays valid in every scene. To keep it after closing the game: see the Keeping the score recipe.