← Yop2D

How to add a ready-made object?

Beginner guide · no code

Français · English · Español · Deutsch · Italiano · Português · Русский · 中文 · 日本語

A prefab is an object that already has its behaviour: for example a button that spins, glows or animates when you touch it. You download it, drop it into your scene, and it is ready, with nothing to connect. Everything is free to use (CC0): you can use it in your games, even to sell them.

You need:

Step 1: download a prefab

  1. Open the Yop2D Library (+ → Image button, or the Library button of the Resources panel).
  2. Tap the ⬇ Prefabs to download tab, next to "Packs to download".
  3. Tap a prefab to download it. To take several at once, tap ☐ Choose several, tick the ones you want, then ⬇ Download.
👉 A downloaded prefab is stored in your project's Prefabs folder: you never need to download it twice.

Step 2: add it to the scene

  1. In the ⬇ Prefabs to download tab, touch + Add to the scene under a prefab you have already downloaded.
  2. A "linked scene" object appears in the middle of the screen: it shows the prefab. In addition, a scene with its name is created in the Scenes list (shown under the scene that uses it).
  3. You can place several: all copies share the same scene, but each keeps its own state (for example one switch on and another off).
👉 Another way: + → Prefab places a placeholder; select it, tap Image in the Inspector and pick a prefab from the grid.

Step 3: customise it

  1. Run the game (▶) and touch or hover the prefab to see how it behaves.
  2. In the Scenes list, touch the prefab's ↳ line: its scene opens. Change the image, the text, the font or the colour with the Inspector.
  3. Open the Blueprint to change what happens on touch (for example add “Go to scene” to start a game).
👉 Everything can be edited: these are real objects and real nodes, just as if you had made them yourself.

Ready-made interface pieces

Add your own prefabs

If it doesn't work