Hi,
I’ve an actor in my game (based on the ShooterGame project) that is spawned on a level, and I want to show it only in a specific game mode.
At first I was fetching/testing the current game mode like this:
if (GetWorld()->GetAuthGameMode<AG_CTF_GameMode>())
… which was working but only server-side. Then I saw on the AnswerHub that GetAuthGameMode() was only available on the server. I looked for other solutions like testing the GameState instead (I have one gamestate class per game mode) :
AShooterGameState* const GSt = Cast<AShooterGameState>(GetWorld()->GameState);
but GSt is always == NULL. I tried casting it to my custom GameState too (AG_CTF_GameState).
Do you have any hints?
Thanks