Hi,
i need a little bit of help, because i’m stuck:
I want to create a Scoreboard. My first step is to show up a simple “Test-Text” box on the screen.
I Created a Widget Blueprint called “Scoreboard” and added a Textbox by Following this Tutorial: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums. My C++ Class is named “Scoreboard” with nothing in it, but the generated stuff.
Now is the point where i don’t know how to proceed.
The Code is like [TUTORIAL/SNIPPET] Creating a UMG Widget in C++, and delegate example - Community Content, Tools and Tutorials - Unreal Engine Forums
PlayerHUD.h
...]
UCLASS()
class FPSPROJECT_API APlayerHUD : public AHUD
{
GENERATED_UCLASS_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUD)
TSubclassOf<UScoreboard> ScoreboardClass;
class UScoreboard* ScoreboardWidget;
...]
}
PlayerHUD.cpp
void APlayerHUD::BeginPlay()
{
Super::BeginPlay();
AStdCharacter* MyPawn = Cast<AStdCharacter>(GetOwningPawn());
if (MyPawn)
{
ScoreboardWidget = CreateWidget<UScoreboard>(Cast <APlayerController>(MyPawn->Controller), ScoreboardClass);
}
}
My Question is: How do i get Something into ScoreboardClass? And what? I would like to hardcode it in C++
I think my Widget is linked via the “Parent Class”, right?
Thanks in advantage for your help!