super-duper-spoon/Source/Shooter/ShooterPlayerController.cpp

28 lines
537 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "ShooterPlayerController.h"
#include "Blueprint/UserWidget.h"
AShooterPlayerController::AShooterPlayerController()
{
}
void AShooterPlayerController::BeginPlay()
{
Super::BeginPlay();
// Check our HUD Overlay TSubclassOf variable
if (HUDOverlayClass)
{
HUDOverlay = CreateWidget<UUserWidget>(this, HUDOverlayClass);
if (HUDOverlay)
{
HUDOverlay->AddToViewport();
HUDOverlay->SetVisibility(ESlateVisibility::Visible);
}
}
}