martinluckyrobots 4d4026d9ad Optimize code to unreal style
2025-04-07 11:32:45 +08:00

15 lines
368 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "UI/GameUserWidget.h"
#include "Core/LuckyRobotsGameInstance.h"
void UGameUserWidget::NativeConstruct()
{
Super::NativeConstruct();
if (ULuckyRobotsGameInstance* GameInstance = Cast<ULuckyRobotsGameInstance>(GetGameInstance()))
{
GameInstance->GameUserWidget = this;
}
}