Just for debugging purposes, try putting a delay after the Event Construct of a second or two to see if it’s possible that the Game State is returning null because it doesn’t exist yet. Let me know the results of that test and then we can continue to investigate from there.
In the screenshot I was showing event construct. But that was debugging. It won’t work on key presses from player controller either. Game state is the default one.
Also, the problem is that I’m using a binding function in my Widget. If the gamestate doesn’t exist yet how can the binding work? Do I have to put an isValid for every time I try to cast gamestate?
It’s always worth using an IsValid node just to prevent any null references.
Have you overriden the Game Mode in the World Settings at all? Try creating a new Game Mode and set your Game State in that one instead, seeing if that makes a difference.
So if I create a brand new level, and override the gamemode in the world with a new one (via “+” icon) it doesn’t work either. But if I open that new game mode and hit compile then it works. I’m sure this was working before in 4.10 without having to go and compile the blueprint.
I’m not sure that I’m understanding the issue, as compiling the blueprint before it will work properly seems like expected workflow to me.
Can you provide some repro steps that we can use to reproduce this issue in a clean project? That will give more context and help me ensure I’m understanding the issue correctly.
Set it in the World Settings as the Game Mode Override
Created a new Game State
Set it in the Game Mode
In the game state, added a print string (The Game State Has Spawned)
In the level blueprint, I used a get game state node and printed that as well
In both 4.11.2 and 4.12.4, the game state was printing those messages on begin play as expected. Is there a step that I am missing which is causing me to be unable to reproduce your issue?