Overlays

Overlays are a special type of scene with a transparent background that can be placed over a running scene.

 

 

Overlays are commonly used for pause menus, game over screens, start screens, or any other sub menu. By default hyperPad includes two overlays for you. A pause menu overlay, and a Game Over overlay. These two supplied overlays are set to "Preload" when your project starts for faster performance (For more information on preloading see "Preloading a Scene or Overlay").

Note:  Preloading is a PRO feature, so if you toggle preloading off you will not be able to turn it back on unless you have an active PRO subscription.

For performance reasons you want to avoid having too many preloading overlays. Additionally you want to avoid having too many objects, and too many behaviors on your overlays. The more objects and behaviors you have, the longer it can take to load your overlay. If preloading is off and you try to load a complex overlay you may notice a delay until your overlay becomes visible.

 

Loading Overlays:

You can think of overlays like a stack of cards. Each overlay opened overlay is like a new card that sits in front of the last. If you close an overlay, it will reveal the overlay behind. If there are no overlays open below, then it will reveal the running scene.

You can start an overlay by using the Load Overlay behavior. The load overlay behavior will launch an overlay in front of your current scene, or overlay.

The Load Overlay behavior has 3 options. Select Transition, Select Overlay, and a Pause toggle.

Select Transition: The Select Transition option allows you to animate your overlay in view. For example, the "Fade" option will fade your overlay instead of appearing instantly.

 

Select Overlay: The Select Overlay option allows you to select any overlay to open. See "Adding a New Scene" to learn how to create a new scene or overlay for your project.

 

Pause: The Pause toggle switch allows you to pause anything behind the overlay. If the toggle is off, the selected overlay will be visible while your scene is active behind. Note that you can not interact with anything behind an overlay, whether or not it is paused.

 

Closing Overlays:

Use the Close Overlay behavior to close the front most open overlay. In most cases, each overlay should be responsible for closing it self. This means you typically want the Close Overlay behavior to be triggered on each overlay you have.

Similarly to the Load Overlay behavior, you can select a transition to play while the overlay closes.

However, for Close Overlay there are 2 new toggle switched. Unload, and Resume All.

 

Unload: The Unload toggle switch will unload the overlay from memory. This means the next time you want to open the overlay you will need to wait while it loads. You typically only want to unload overlays that will no longer be used and to free up resources for a new scene or overlay to preload.

Resume All: The Resume All toggle, will automatically resume all overlays and the scene behind the overlay. By default, the overlay (or scene) below is automatically unpaused when the overlay is closed. If this toggle is on, it will not only resume the overlay behind, but all overlays as well. It is only necessary in very specific situations.

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk