// 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(GetGameInstance())) { GameInstance->GameUserWidget = this; } }