Player always returns null on updated project

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.

try exploring the source code, see what FClassFinder expects as parameters; also, try replacing that line with static ConstructorHelpers::FClassFinder PlayerPawnClassFinder(TEXT(“'APawn/Game/Blueprints/MainCharacter/test”));

Your best bet right now is to post your whole project source

Wont even compile, it wont even work when you feed the variables directly to the gameMode blueprint… i am completely lost.

its a whole complete game, what if some one simply copies the whole thing and starts making money out of the assets/code? i am in a tight spot here…

I am only trying to move it to 4.16 because i want to launch it on the switch.

I found out the solution after 3 days of working on this, it seems that newer versions of the engine have this variable on the defaultEditor.ini :

bDontLoadBlueprintOutsideEditor= false

Set it to false like so and it works again, hopefully people see this and dont have to go through the same trouble.