Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/UGameViewportSubsystem
Description
Adds the widget to the game's viewport in the section dedicated to the player. This is valuable in a split screen game where you need to only show a widget over a player's portion of the viewport.
| Name | AddWidgetForPlayer |
| Type | function |
| Header File | /Engine/Source/Runtime/UMG/Public/Blueprint/GameViewportSubsystem.h |
| Include Path | #include "Blueprint/GameViewportSubsystem.h" |
| Source | /Engine/Source/Runtime/UMG/Private/Blueprint/GameViewportSubsystem.cpp |
UFUNCTION (BlueprintCallable, BlueprintCosmetic, Category="User Interface")
bool AddWidgetForPlayer
(
UWidget * Widget,
ULocalPlayer * Player,
FGameViewportWidgetSlot Slot
)