Cast problem

As it is now it would be an Instance of AProjectile. I tried to remove the Abstract but i have the same error.

I simply tried to follow the way it was done in the shooter example :

AShooterProjectile.h :



UCLASS(Abstract, Blueprintable)
class AShooterProjectile : public AActor


and then within ShooterWeapon_Projectile.ccp :



void AShooterWeapon_Projectile::ServerFireProjectile_Implementation(FVector Origin, FVector_NetQuantizeNormal ShootDir)
{
	FTransform SpawnTM(ShootDir.Rotation(), Origin);
	AShooterProjectile* Projectile = Cast<AShooterProjectile>(UGameplayStatics::BeginSpawningActorFromClass(this, ProjectileConfig.ProjectileClass, SpawnTM));
	if (Projectile)
	{
		Projectile->Instigator = Instigator;
		Projectile->SetOwner(this);
		Projectile->InitVelocity(ShootDir);

		UGameplayStatics::FinishSpawningActor(Projectile, SpawnTM);
	}
}