I’ve stumbled over some weird bug(?) i think. But I am not sure, so I come here for clarification, maybe it is just me, missing concepts or something.
Situation is quite simple and easy to replicate:
- First Person template(C++) in UE 5.3.2.
- Open BP_FirstPersonCharacter blueprint, and in some graph, try to add not-even connected to anything node related to the BP_FirstPersonGameMode, like:
It also could be even an empty variable-reference(to object) of the BP_FirstPersonGameMode. Whatever you like. - This one is unrelated, but for sake of example - create Widget Blueprint, empty, but in the graph, place same things related to BP_FirstPersonGameMode.
When i try to play such stuff, it all works, in my example BP_FirstPersonGameMode i’ve made some functions, and both BPs mentioned above(Character and Widget) can access those, and game perform well as intended.
BUT!
It fails to build without failing or errors!
If, there is no referencing related to the GameMode, when i press “Build All Levels” it builds project in ~19 seconds, but when there is reference, it never ends and does nothing after a while!!!
I went AFK one time, and came back, after 5 minutes it is still “Build” window, checked PC metrics - all stale, drive, CPU are at ZERO. It means build stuck and will never be complete by the Editor.
How did i found that? I came back todays morning, turn on PC with intent to proceed with yesterdays project, and for my surprise UE Editor Splash, even after 15 mins stuck at 75%, and my project can not be opened in any way:
After tossing files around, i detected that problem is exactly BP_FirstPersonCharacter.uasset file. I rolled back to the first version that particular file, and after few hours - project finally loaded!
Then even more time spent, and found that exactly referencing GameMode in any way causing this issue, exactly in BP_FirstPersonCharacter, when in the Widget Blueprint - it all works just fine. And Character BP can reference other things, like Cast to “BP_FirstPersonPlayer_controller” for example, but not GameMode-related things.
So is it me, who never got to know some secret relationship between Character and GameMode, or it all just another bug?