martinluckyrobots b7ed84f353 Optimize some gameinstance codes
2025-04-03 10:13:55 +08:00

17 lines
460 B
C++

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