When UI is Activated
Fires when this UI panel becomes active in the world, either through the Change UI command or when a player enters the world.
Parameters
None This event has no parameters. The event fires on its own and everything you need is the object running this script. Parameter Description
Introduction
When UI is Activated is an event in the UI group of UI Events. It fires when this UI panel becomes active in the world. Like every event, it does nothing by itself. It waits for the right moment, then runs all the actions connected to it. The panel being activated can live in any of the three UI types: the Character UI that follows a character, the Prop UI attached to a prop, or the Vehicle UI on a vehicle. Activation is the front door of every panel, so pair it with the gesture events that follow - When Tapped , When Pressed , and When Touch Move - to build menus that react the instant players see them. When UI is Activated event in the UI Editor Image The When UI is Activated event in the UI Editor. caption When UI is Activated, fires when the UI panel becomes active.
How to Access
How to Access - When UI is Activated
How to Use
Open the UI Editor and press the UI Property button (the document icon in the top toolbar) without selecting any element, the UI Base panel opens on the right. In the panel's Event Triggers section, find When UI is Activated and press Scripts + next to it, then add the actions that should run when the event fires: the setup the panel needs every time it becomes active, such as resetting its fields. Keep one-time setup out of this event, so it really runs on every activation. Press Play and open the panel to confirm the setup runs each time it activates.
Common Uses
Reset panels to a clean state Play open animations Refresh lists when a panel opens
Tip
Use this event for per-open setup. Actions that must run only once for the whole world belong on world start, not here.
Example
When UI is Activated event with Reset Form and Play Animation Slide In actions when-ui-is-activated-example.webp Example: the player receives one item in the inventory every time the panel becomes active. caption