Yes. In C++ you just do:
FString AssetPath = TEXT("/Game/Blueprints/BP_TargetItem");
UClass* BP_TargetItemClass = ConstructorHelpersInternal::FindOrLoadClass(AssetPath, UObject::StaticClass());
I don’t think there’s FindOrLoadClass or the functions that use it are exposed to blueprints. But you can do it yourself. Create a BlueprintFunctionLibrary class and add this function to it:
UFUNCTION()
static UClass* GetClassFromBlueprintPackage(FString PackagePath) {
return ConstructorHelpersInternal::FindOrLoadClass(PackagePath, UObject::StaticClass());;
}
Then in a blueprint:
FindOrLoadClass function works with asset paths in a form of “/Game/Blueprints/BP_YourBlueprintClass” and “/Game/Blueprints/BP_YourBlueprintClass.BP_YourBlueprintClass_C”.