I am copying this from the answer hub because i am starting to get desperate…
Recently i upgraded my game from 4.7 to 4.16, after fixing most of the code i got the project running, i tried to package the game and it would make a process but never show an actual window, i found that the line of code that was hanging the process was this one:
- static ConstructorHelpers::FClassFinder<APawn> PlayerPawnClassFinder(TEXT("/Game/Blueprints/MainCharacter/test"));
That line of code is in the gamemode class, it fetches the class that you want to set for the game’s default pawn.
Moving on… i tried to work around this by making a blueprint derived from my game mode and setting my pawn directly on the blueprint, this works fine in the editor as did the above line of code, but when you try compile in “debugGame” or “development” it crashes every time because the playerCharacter is null.
I even tried to make a new blueprint derived directly from the paper2Dcharacter, just to see if it was something in my code but the result was the same, the only thing that work to set a defaultPawn that doesnt crash in “debugGame”, “development” and i assume packagaed games is if i set the defaultPawn like this:
- DefaultPawnClass = AWindGameCharacter::StaticClass();
At this point i just think this is a bug, I have been trying to get this fixed for a 3 days now, some one for the love of god give me a hand here.