How do you cast to the gamemode
I have data on my GameMode that Im trying to access within an actor blueprint but no matter how I try I cannot cast to the gamemod, even the documentation wasn't helping, Please can you help me? how do you cast to the GameMode?
Andrew Booth 3D
asked Jan 19 '17 at 10:24 PM in Blueprint Scripting
You're casting it correctly.
Please note though, your Game Mode object is ONLY available (not null) on the Authority machine. This means when you are playing multiplayer, if you call GetGameMode() on the client it will return NULL therefore the cast will fail.
What is the purpose of this data that you are accessing? Perhaps it makes more sense to store it in the game state which is accessible to all machines.
answered Jan 19 '17 at 10:29 PM
also did you set your settings here?
someone else had a similar problem. If you do not change this to your game mode, when you cast your game mode it's failing, because that game mode doesn't exist and the engine ran the default game mode
answered Jan 20 '17 at 02:56 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here