Change GameMode parent class on C++ ERROR

Hi everyone!

I wanted to use a UE4 game mode function called restart game. The issue I had Is that my GameMode was a child of GameModeBase. So what I did was adding the include and changing the parent class from GameModeBase to GameMode. The problem that I’m having now is that when I compile the project, it does not open the UE4 editor. It does not give me any type of error, it just doesn’t open. I’ve tried to recompile visual studio projects but it didn’t work as well. I’ve tried to parent it again to GameModeBase and it happens the same. It does not give any type of error, it just simply does not open the UE editor

And if I try to compile it from the uproject itself, it gets stuck at 71%.

Any idea what could I try to get this working again? Hope someone can help me, been stuck with this for hours now :frowning:

Stuck at 71% is quite a common issue from my experience. It happens when assets are directly referenced in C++, such as

static ConstructorHelpers::FObjectFinder<UClass> SomeName( TEXT( "Blueprint'/Game/YourProject/SomeFolder/YourBP.YourBP_C'" ) );

Here is a bit more info, but generally removing ConstructorHelpers should fix the issue.This bug is occurring quite randomly, so it probably does nothing to do with the GameMode itself.

It was in fact a FObjectFinder problem. I changed the name of my character as well and it was set on the game mode constructor. Good to know when the compiler is stuck at 71% could be by this kind of problem. Thanks :smiley:

Glad to help. If you are happy with this answer, please mark this question as answered.