Hello, I’m trying to load+create a UObject – **EQ_Gun **from the content browser. It’s a blueprint based on the class UEQBase.
A UEQBase object is created fine, but it’s the empty class, not the specific blueprinted version with my values in it.
FSoftObjectPath path("/Game/Data/Ranged/EQ_Gun.EQ_Gun"); UObject* asset = path.TryLoad(); UBlueprint* bp = Cast<UBlueprint>(asset); UEQBase* equip = NewObject<UEQBase>(bp->GeneratedClass);
I’ve tried a number of combinations, from NewObject directly on the asset var, casting things, etc, but it always just spawns the empty class object, not the blueprint.
The weapons are being loaded in dynamically from the path, so I can’t use and hard TSubclassOf references unfortunately.
How can I do this properly? Thanks!