using { /Fortnite.com/Devices }
using { /Verse.org/Sim }
using { /UnrealEngine.comTemporary/Engine }
using { /UnrealEngine.comTemporary/UMG }
# This is our main "Island" script.
# Think of it as the game master that runs when the match starts.
simulated script type CustomHUDScript() inherits IslandScript() :
# A variable to hold our custom widget.
# In game terms, this is like holding the "glass sheet" we want to show.
MyCustomWidget: UserWidget = UserWidget{}
# The "BeginPlay" function is like the moment the Battle Bus door opens.
# Everything inside here runs once when the game starts.
BeginPlay()~>
# 1. HIDE THE DEFAULT HUD
# We use the HUD Controller device to turn off specific parts of the default UI.
# This is like telling the default bouncer to stand down.
if (Controller := GetDefaultHudController()) {
# Hide the health bar
Controller.SetHealthBarVisible(false)
# Hide the shield bar
Controller.SetShieldBarVisible(false)
# Hide the minimap (optional, but makes the screen cleaner)
Controller.SetMinimapVisible(false)
}
# 2. SHOW THE CUSTOM WIDGET
# We need to create an instance of our widget and attach it to the screen.
# We look for the widget we made in the Widget Editor.
Verse Library
verse
01 Fragment
Hides default Fortnite UI elements and loads a custom user widget for a tailored player interface.
verse-library/making-a-custom-hud-in-unreal-editor-for-fortnite/01-fragment.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.