UGameplayStatics::GetPlayerController(GWorld, 0)


使用“选中的视口”进行播放时,会导致本地化设置不能生效,而且调用UGameplayStatics::GetPlayerController(GWorld, 0)会返回nullptr,而使用“独立窗口运行”,则不会出现以上错误,但是这样不能调试代码,请问怎么才能正确的在“选中的视口”调试demo又能避开错误呢?

Playback using “selected viewports” will cause localization settings to not take effect, and calling UGameplayStatics::GetPlayerController(GWorld, 0) will return nullptr, while using “independent window execution”, the above error will not occur, but This can not debug the code, how can we correct the “selected viewport” debugging demo can avoid errors?

My English is not good, the above English content comes from google translation

Thank you guys for coming in to see this problem