Hi people,
My problem: I want to get the current gamemode in the game and cast it to the gamemode but the program crash my editor.
.h
protected:
class ATestAgainGameModeBase* GameMode;
.cpp
ARedCube::ARedCube()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
GameMode = GetWorld()->GetAuthGameMode<ATestAgainGameModeBase>();
}
Edit :That normal than my default GameMode is a GameModeBASE and not a simple GameMode ?