Hi everyone,
Today a huge part of my code suddenly stopped working. Code after any “Cast To” (GameInstance, ThirdPersonCharacter etc.) node doesn’t run. Below I’ve pasted some code that I tried to ‘debug’ myself. “Pre cast” prints without any issues, but “post cast” or any code afterward doesn’t run. I am using UE 5.1. Unfortunately, I can’t figure out what happened and why the code no longer works or find anything on the internet that could solve my problem.
Chances are you’re using a new map, where the default game mode isn’t set to the mode that specifies your game instance class.
Alternatively, the game mode you defined has changed to specify some other game instance class.
Alternatively, you’re using the “default game mode” in project settings, and those got changed somehow.