VerseIsland
FeedLearnLeaderboardGuidesReferenceExploreSearchDocsVerse Library
Sign in
Feed Learn 📖 Codex Leaderboard Guides Reference Explore Search Docs Verse Library
Browse Fortnite›UI·Up to Fortnite · UI·3 of 147 in UI

Creating and Removing Widgets in UEFN

The following sections show how to add a widget to a player’s UI and remove a widget.

These examples use a text block widget, but you can use any kind of widget. See Widget Types for all the types of widgets you can use.

Adding a Widget

This example shows how to add a widget when a player interacts with a Button device in the level:

  1. Create a new Verse device and add it to the level. To learn how to create a new device in Verse, see Create Your Own Device Using Verse.
  2. Open your Verse file in Visual Studio Code with Verse Explorer.
  3. Add an editable Button device property to your Verse device and set up the reference to the Button device in your level. To learn how to create editable properties, see Customize Device Properties. # Set the Button device in the Editor to reference the device in the level @editable MyButton : button_device = button_device{}
  4. At the top of your Verse file, add the following lines to use the Verse UI API: using { /UnrealEngine.com/Temporary/UI } using { /Fortnite.com/UI } using { /UnrealEngine.com/Temporary/SpatialMath}
  5. This UI is only per player, so you'll need a reference to a player to access their UI. This example shows how to display a custom UI when the player interacts with a button, since events for devices include a reference to the player that interacted with the device. To learn how to set up event subscriptions, see Coding Device Interactions. `# Runs when the device is started in a running game OnBegin<override>()<suspends> : void = MyButton.InteractedWithEvent.Subscribe(HandleButtonInteraction)

    A custom UI can only be associated with a specific player, and only that player can see it

    HandleButtonInteraction(Agent : agent) : void =

    Display UI`

  6. Now, you can call the failable function GetPlayerUI[] in an if expression to get a reference to the player’s UI.

You're reading a preview

The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.

Sign in with Discord — free for members Read the original at Epic Games documentation

Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.

Guided course

Add this to your free study plan — we’ll suggest related material and stitch it into one compile-checked lesson.

Keep exploring
More in UI · 3 of 147
Prev
attribution screen in fortnite creative
Next
creating ui with verse in unreal editor for fortnite
Browse all files in this folder (A–Z)

Source

Epic Games documentation

View original

Last updated 2026-05-12T21:53:56.568968+00:00

VerseIsland· an archipelago of Verse & UEFN knowledge
🗺️ Island atlasLearnGuidesHistoryAbout & PressSources & LicensingPrivacy PolicyTermsStatus

Not affiliated with Epic Games. Fortnite, UEFN, Unreal Engine, and Verse are trademarks of Epic Games, Inc. Content is attributed to its source — see Sources & Licensing.

🦜

Scout · your island guide

The Isle of Verse