October 2016
Intermediate to advanced
452 pages
9h 47m
English
So we have already discussed how to add a widget to the viewport, which means that it will be rendered on the player's screen.
However, what if we want to have UI elements that are toggled based on other factors, such as proximity to certain Actors, or a player holding a key down, or if we want a UI that disappears after a specified time?
GameMode class called ToggleHUDGameMode.BeginPlay and EndPlay.UPROPERTY:UPROPERTY() FTimerHandle HUDToggleTimer;
TSharedPtr<SVerticalBox> widget;
BeginPlay with the following code in the method body:void AToggleHUDGameMode::BeginPlay() { Super::BeginPlay(); widget ...Read now
Unlock full access