Code no longer run after any "cast to" node

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.

Thank you in advance for your help.

Is your default GameInstance == GI Basic Game Instance?

1 Like

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.

1 Like

Apparently, some of the project settings were restored to default including GameInstance. Problem solved. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.