Hi all. I want to implement a function to open a new map in a Slate Widget class
but, it's crashed. The reason is UGameplayStatics::GetPlayerController(GWorld, 0) return null
why is this?
Thanks for any thoughts!
Code:
void SMenuWidget::EnterGame() { UGameplayStatics::OpenLevel(UGameplayStatics::GetPlayerController(GWorld, 0)->GetWorld(), FName("NewGameMap")); }
why is this?
Thanks for any thoughts!