Download

spawning variable subclasses of blueprints at runtime.

Hello everyone, hopefully some of you can help me out with this issue I am having.
a bit of backstory, Im storing weapon data inside an sql database. However my initial plans arent going to work out because different weapons have different firing properties.
So my current thought is to have a specific blueprint location stored in the sql file, and when necessary spawn that blueprint then initialize the relevant stats.

Ive been messing around with ConstructorHelpers but I cant seem to set it before it gets spawned.

so something like:
ConstructorHelpers::FObjectFinder<UBlueprint> BlueprintType;
FConstructorStatics()
:BlueprintType(TEXT("%s",*BlueprintStringLocation))

where BlueprintStringLocation holds the string: Blueprint’/Game/Blueprints/Items/Weapons/BP_TestWeapon.BP_TestWeapon’.

however I cant figure out how to set the BlueprintStringLocation before the object is initialized and therefore it just doesnt work. Im assuming Im just doing something horribly wrong/stupid/ignorant so any help would be appreciated.

-nate