How can I get GameInstance?

When I use a piece of code in my project,"UGamePlayStatics::GetGameInstance()“Or"GetGameInstance()”,this will make the Editor crash?
I want to save two TMaps variable in the GameInstance,But I can’t get that;
Who can tell me how to solve it?

Hi,

Are you able to show your snippet of code that you are using and also show us the crash report you are receiving? These will be helpful in debugging your issue. Thanks :slight_smile:

GetWorld()->GetGameInstance();