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