Packaged Game doesn't load blueprints

When I Package and run the game or if I launch from editor my blueprints don’t load into the game.

I load a blueprint with

static ConstructorHelpers::FObjectFinder<UBlueprint> M16A1Ob(TEXT("Blueprint'/Game/Blueprints/Guns/BP'"));
	if (M16A1Ob.Object)
		GunBP = (UClass*)M16A1Ob.Object->GeneratedClass;
    else
        if(GEngine)
            GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Blue, TEXT("Error MSG"));

That works fine In the editor but when I package the game it finds M16A1Ob because the else statement doesn’t run
but the GunBP doesn’t show up inside the actual game and none of it’s constructor code runs.

When using Objects just referenced on StaticLoads you need be sure that you included the directories on Project Settings>Packaging>Additional Asset Directories to Cook (I think you did this).

But when including more than one AssetDirectory the Editor is inserting lots of “…/…/…/” on the previous one, so your asset could be being packaged BUT inside the AssetRegister/InnerPackageAddress it’s being assigned to one innexistent “path”.

If you go on your package Settings and remove the “…/…/…/…/…/Game” they’ll be at least found on the loads.

Maybe it cannot find the directory of the BP? Have a look at this page: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

Just a quick example, here’s what I do to get an FString to my Content directory:

FString thePath = FPaths::ConvertRelativePathToFull(FPaths::GameContentDir());

Also does AddOnScreenDebugMessage() work in Packaged buildings? I’d assume they don’t, but could be wrong.

As long as I keep it as a development package addonscreendebugmessage works

I dont understand ths. I understand fles but ths is qute confusng