Verse Library verse

15 Creating Onhide Functionality

Removes a specific UI widget from every player screen when triggered, ensuring global interface updates.

extracted-snippets/documentation/en-us/fortnite/material-block-in-fortnite/15-creating-onhide-functionality.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/material-block-in-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/material-block-in-fortnite.md
# Section:    Creating OnHide Functionality
OnHide(InAgent: ?agent):void=
Print ("Hide")
for:
Player:GetPlayspace().GetPlayers()
PlayerUI := GetPlayerUI[Player]
do:
PlayerUI.RemoveWidget(MyUI)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in