NoesisGUI Unreal Engine ShooterGame Demo
Introduction
This is a modified version of Epic's ShooterGame tutorial in which we've replaced the original UI (HUD and menus) with one made with NoesisGUI. Because the original UI was done using native code (HUD
and Slate Widget
s), we've had to make some changes to expose some data and functionality to Blueprint
s, but all the UI is done using XAML and Blueprint
s.
Demo Breakdown
Blueprint
Blueprint'/Game/ShooterGame/ShooterGame_Menu_Noesis.ShooterGame_Menu_Noesis'
,Blueprint'/Game/ShooterGame/ShooterGame_TeamDeathmatch_Noesis.ShooterGame_TeamDeathmatch_Noesis'
andBlueprint'/Game/ShooterGame/ShotterGame_FreeForAll_Noesis.ShotterGame_FreeForAll_Noesis'
: TheseGameMode
s replace the original ones. They specify which controllers to use (Blueprint'/Game/ShooterGame/ShooterPlayerController_Menu_Noesis.ShooterPlayerController_Menu_Noesis'
inBlueprint'/Game/ShooterGame/ShooterGame_Menu_Noesis.ShooterGame_Menu_Noesis'
andBlueprint'/Game/ShooterGame/ShooterPlayerController_Noesis.ShooterPlayerController_Noesis'
in the other two), and specify noHUD
will be used, as we will be using NoesisGUI for it.
Blueprint'/Game/ShooterGame/ShooterPlayerController_Menu_Noesis.ShooterPlayerController_Menu_Noesis'
: It replaces thePlayerController
used in the main menu of the game. It binds to the eventsOnStateStarted
andOnStateEnding
fromShooterGameInstance
. The functionOnStateStarted
is responsible for creating aWidget
from theNoesisView
NoesisBlueprint'/Game/ShooterGame/MainMenuView.MainMenuView'
, adding it to the viewport and setting the input mode.
Blueprint'/Game/ShooterGame/ShooterPlayerController_Noesis.ShooterPlayerController_Noesis'
: It replaces thePlayerController
used in game. It handles theInGameMenu
InputAction
to show and hide the in game menu, which is aWidget
created from theNoesisView
NoesisBlueprint'/Game/ShooterGame/GameMenuView.GameMenuView'
.
NoesisBlueprint'/Game/ShooterGame/HUDView.HUDView'
: It's theNoesisView
for the in game HUD. It also theDataContext
for theNoesisXaml
NoesisXaml'/Game/ShooterGame/HUD.HUD'
. It exposes the properties used forBinding
as variables, which are grouped in the 'Properties' category.
NoesisBlueprint'/Game/ShooterGame/GameMenuView.GameMenuView'
: It's theNoesisView
for the in game HUD. It also theDataContext
for theNoesisXaml
NoesisXaml'/Game/ShooterGame/GameMenu.GameMenu'
. It exposes the properties used forBinding
as variables, which are grouped in the 'Properties' category, and a few as pairs of Get/Set functions. Note how the propertiesInfiniteAmmo
,InfiniteClip
,FreezeMatchTimer
andHealthRegeneration
, which are the ones implemented as functions and get their data from theShooterPlayerController
are manually notified in theInitialize
function when said variable changes, as well as in the corresponding Set functions. It also implements theCommand
sApplyOptions
,Resume
,BackToMainMenu
andQuit
.
NoesisBlueprint'/Game/ShooterGame/MainMenuView.MainMenuView'
: It's theNoesisView
for the in game HUD. It also theDataContext
for theNoesisXaml
NoesisXaml'/Game/ShooterGame/MainMenu.MainMenu'
. It exposes the properties used forBinding
as variables, which are grouped in the 'Properties' category. It also implements theCommand
sApplyOptions
,HostFFA
,HostTDM
,SearchServer
,JoinGame
andQuit
.SearchServer
andJoinGame
are used alongCanExecuteSearchServer
andCanExecuteJoinGame
, that serve as theCanExecute
functions of their respectiveCommand
s.
ShooterEntry - Level Blueprint
: It has aGameMode
override to useBlueprint'/Game/ShooterGame/ShooterGame_Menu_Noesis.ShooterGame_Menu_Noesis'
.