2025-05-06 21:24:10 +01:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
|
|
#include "MyUserWidget.h"
|
2025-05-07 21:38:27 +01:00
|
|
|
#include <MyPlayerState.h>
|
2025-05-06 21:24:10 +01:00
|
|
|
|
|
|
|
void UMyUserWidget::NativeOnInitialized() {
|
2025-05-07 21:38:27 +01:00
|
|
|
auto ps = StaticCast<AMyPlayerState *>(GetOwningPlayerState());
|
|
|
|
if (ps == nullptr)
|
|
|
|
return;
|
|
|
|
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
|
2025-05-06 21:24:10 +01:00
|
|
|
|
|
|
|
}
|