Hello there,
I am spawning some blueprints via code which causes my problem here. Everything works finde in the preview, but the packaged game crashes. I think it has something to do with the way I am spawning the blueprints via c++.
For example:
.h
TSubclassOf<class AArrowTowerProjectile> ArrowTowerProjectileBP;
AArrowTowerProjectile* Projectile = nullptr;
.cpp in the constructor
static ConstructorHelpers::FObjectFinder<UBlueprint> ProjectileBP (TEXT("Blueprint'/Game/Blueprints/Tower/BP_ArrowTowerProjectile.BP_ArrowTowerProjectile'"));
ArrowTowerProjectileBP = (UClass*)ProjectileBP.Object->GeneratedClass;
and then spawning it in some function in the cpp file
Projectile = World->SpawnActor<AArrowTowerProjectile>(ArrowTowerProjectileBP, this->GetActorLocation(), FRotator::ZeroRotator);
like I said it is working fine in the preview. I think this all has something to do with the path I am using to find the blueprints.
Tank you for your help
Edit:
[2015.06.30-23.41.09:867][ 0]Error: CDO Constructor (ArrowTower): Failed to find Blueprint'/Game/Blueprints/Tower/BP_ArrowTowerProjectile.BP_ArrowTowerProjectile'