Spawn Blueprint from path in c++

#include "UObject/ConstructorHelpers.h"

		FString AssetPath = TEXT("/Game/Blueprints/BP_TargetItem");
		UClass* BP_TargetItemClass = ConstructorHelpersInternal::FindOrLoadClass(AssetPath, UObject::StaticClass());

This is the most universal and easy to use way to load blueprint classes. Works in constructors and outside. You don’t need the .BP_TargetItem_C after package path.

You need to add CoreUObject to the dependencies of your project.