Create a pop-up
In this article, we show you how to create a pop-up that can appear on demand. You can use any trigger to make this pop-up appear or disappear.
Create all the required elements (background, image, text, ...) for your pop-up and add them into a Group collection. You should also embed a button in this group that will enable the user to close the pop-up.
- To be sure your pop-up is always visible, move it to the Front layer of your scene.
Either move the pop-up outside of the scene, or uncheck its Visible property
- Move it if you want to use a slide effect.
- Hide it if you want it to appear in place.
Choose the trigger that will make this pop-up move into the scene / become visible. For example:
- When a button is released, like an "Info" or "Menu" button
- When the scene is double-tapped, such as when your pop-up is intended to act as a hidden menu
Chose the action that will make your pop-up visible.
- If you moved the pop-up outside of the scene, use the Move to action to slide it to the required location.
- If your pop-up is hidden and already situated at the correct location, call the Show action to make it visible. You can play with the Show options to create a zoom effect when the pop-up appears.
Add a trigger/action pair to the button inside your group to create the opposite behavior - that is, to make the the pop-up move away / disappear. For example:
- Call the Move to action to move the group back
to its original position, outside of the scene.
- Call the Hide action.
- Call the Move to action to move the group back to its original position, outside of the scene.