Files
TheracUE/Source/MyProject/Private/MyUserWidget.cpp
wonkyhonky2024 c7d7856634 more nonsense
2025-05-09 16:02:07 +01:00

12 lines
345 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "MyUserWidget.h"
#include <MyPlayerState.h>
void UMyUserWidget::NativeOnInitialized() {
auto ps = StaticCast<AMyPlayerState *>(GetOwningPlayerState());
if (ps == nullptr)
return;
opIdTextBlock->SetText(FText::FromString(ps->GetPlayerName()));
}