//获得当前游戏模式
//UGameplayStatics::GetGameMode(this);
ACarDemoGameModeBase* CarGamemode;
//转成自己定义的GameMode类
CarGamemode=Cast<ACarDemoGameModeBase>(UGameplayStatics::GetGameMode(this));
//获得当前游戏模式
//UGameplayStatics::GetGameMode(this);
ACarDemoGameModeBase* CarGamemode;
//转成自己定义的GameMode类
CarGamemode=Cast<ACarDemoGameModeBase>(UGameplayStatics::GetGameMode(this));