In ACTION GAME MAKER, a dedicated system is available for creating menu screens.
Menus are drawn automatically on top of other elements and are not affected by the camera.
This makes them ideal for displaying status screens, inventory windows, and similar UI elements.
MenuScene Node
A MenuScene node can be created from the Root Node creation screen.
It automatically generates a child node of type CanvasLayer.
All nodes placed under this CanvasLayer, and within the visible bounds (by default, the region outlined in dark blue lines towards the bottom-right), will be drawn on top when the menu is displayed.
The size of the
CanvasLayeradjusts automatically to match the viewport size defined in the Project Settings (Window > Size).
Execution Actions: OpenMenu / CloseMenu
These actions control the visibility of scenes that have a MenuScene as their root.
-
When a menu is opened using
OpenMenu, it is assigned a Menu ID starting from 0 in the order they are opened. -
You can later specify this ID to hide the menu using the
CloseMenuaction.
When to Use MenuScene vs UI Layer
ACTION GAME MAKER also provides a UI Layer when creating a GameScene, which serves a similar purpose.
This UI Layer is also a CanvasLayer, where nodes placed within its region are drawn on top.
However, there are important differences:
| Feature | UI Layer | MenuScene |
|---|---|---|
| Display management | No built-in control | Uses OpenMenu / CloseMenu |
| Recommended use | Always-visible elements like HUD (e.g. HP bar) | Toggleable menus like Inventory, Status Screens |
| Layer type | Static CanvasLayer in GameScene | Dedicated scene with toggling actions |
In summary:
-
Use UI Layer for persistent HUD elements.
-
Use MenuScene for menus that open and close dynamically.