[Feature Request] bDontLoadBlueprintOutsideEditor=false by default

Hi,

This is not technically a bug but i think it should be corrected nonetheless.

I opened (and closed) this thread:

because i got systematic crashes with a packaged game (which worked fine in the editor) when using declaration such as:

static ConstructorHelpers::FObjectFinder<UBlueprint> BP_d4Object(TEXT("Blueprint'/Game/dice/D4_Dice_BP.D4_Dice_BP'"));
	BP_d4 = (UClass*)BP_d4Object.Object->GeneratedClass;

Checking the DefaultEditor.ini, i saw this variable with a interesting name, set to true:

bDontLoadBlueprintOutsideEditor=true

I tried to set it to false:

bDontLoadBlueprintOutsideEditor=false

and bingo, my packaged game worked smooth and fine.

So this is no bug, but i think it would be nice to have it set to false by default when creating a new c++ project.

Thanks

Cedric

What’s the reasoning behind having this defaulted to true? I came here because my packaged game was also crashing.

It’s true by default because Blueprints are not needed outside the editor.

It looks like you’re attempting to access the Blueprint generated class through the Blueprint itself.
Rather, you should just reference the class directly.

For Blueprint’/Game/dice/D4_Dice_BP.D4_Dice_BP’

The class reference is Class’/Game/dice/D4_Dice_BP.D4_Dice_BP_C’

static ConstructorHelpers::FObjectFinder<UClass> bpClassFinder(TEXT("Class'/Game/dice/D4_Dice_BP.D4_Dice_BP_C'"));
if (bpClassFinder.Object)
{
    UClass* bpClass = bpClassFinder.Object;
}

Thanks MulleDK19, that’s gold to my newbie eyes !

This feature request can obviously be cancelled.

Or maybe replaced: could we then have an item “copy class reference” just below “copy reference” + the documentation alongside ?

The “copy reference” method is documented all around and that’s very misleading for beginners (or maybe i missed something ?).

BTW this also answers my other post on the correct way to use BP in code, which i mention here in case anyone reads this:

https://answers.unrealengine.com/questions/130256/whats-the-correct-way-to-load-blueprints-for-packa.html

Thanks

thank you man

Note the “_C” at the end. It’s not the name of the class, is a naming convention for the class of a blueprint. Don’t forget that!