ℹ️ 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:
- a 2D project open in Yop2D Next.
Step 1: the settings scene
- Left panel, Scene tab, SCENES section: tap New scene, choose 2D scene and call it Settings.
Step 2: what's inside
- 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
- Tap Object → Interactive → Button with text.
- Name it retour and type Back in its Text line.
- Open the Blueprint.
- On Object Click: Object retour → Go to scene: Scene Title
Step 4: the Settings button
- Open the title scene (see the A title screen recipe).
- Tap Object → Interactive → Button with text.
- Name it reglages and type Settings in its Text line.
- Open the Blueprint.
- 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.