Hi,
you could try accessing it from
static UGameInstance *UGameplayStatics::GetGameInstance(UObject* WorldContextObject)
This static function needs a world context object in order to recover the world’s game instance.
you could try something like:
UGameInstance* yourInstance = UGameplayStatics::GetGameInstance(GetWorld());
as UUserWidget has a GetWorld() method. You could even try this:
UGameInstance* yourInstance = GetWorld()->GetGameInstance();
Hope this helps.