Popups and toasts
Pause menus, dialogs and short "+50 coins" messages.
A popup appears on top of the screen: a pause menu, a "Really quit?" question, a reward box. A toast is a small message that pops up and goes away on its own, like "+50 coins".
Make a popup
A popup is a group of elements set to behave like a popup.
- Build the popup on the screen: a panel, a title and a few buttons.
- Select all of them and click Group Selected in the Layers panel. Give the group a clear name, like "Pause Menu".
- Click the group in Layers. In the right panel, open the Group tab and turn on Popup.
Popup settings:
- Open / close animation: how it appears and disappears.
- Dim the screen behind: darkens everything behind the popup. Pick the colour and how dark.
- Tap outside closes it and Back / Esc closes it.
- Open when the screen opens: for popups that should greet the player.
While you design, the popup stays visible so you can edit it. In Play mode and in Unity it starts closed.
Tip: Turn on Reveal Hidden in the toolbar to see hidden popups faintly while you work on the rest of the screen.
Open and close it
- Select the button that should open the popup, for example the pause button.
- In Actions, add On Click → Open Popup and pick your group.
- On the popup's close or resume button, add On Click → Close Popup (or Back).
Press Play to try it.
Show and Hide, or Open Popup?
You can also use Show and Hide on any group. The difference: Open Popup adds the dim background, the animation, tap-outside-to-close and the Back button, and remembers which popup is on top. Use popups for windows and Show / Hide for simple things like a hint.
Toasts
A toast needs no design work:
- Select a button and open Actions.
- Add the action Show Toast.
- Type the message, for example "+50 coins", and pick its style.
The toast slides in, stays for a moment and disappears. Toasts work in Play mode and in Unity, and they are translated with the rest of your text when you use localization.