UClassを型安全に扱うことができる
ブループリントとC++の間で情報交換を行うことができるクラス
UPROPERTY(EditDefaultsOnly, Category = "Combat")
TSubclassOf<class AProjectile> ProjectileClass;

こんな感じでブループリント側でBPクラスをc++側に渡せる。
TSubclassOfが返すクラスはUClass型でありAProjectileクラスではないことに注意
なのでSpawnActorのコードは次のようになる
GetWorld()->SpawnActor<AProjectile>(ProjectileClass,Location,Rotation);
TSubclassOf | Unreal Engine 5.4 Documentation | Epic Developer Community
UWorld::SpawnActor | Unreal Engine 5.4 Documentation | Epic Developer Community
UClass | Unreal Engine 5.4 Documentation | Epic Developer Community
TSubClassOfの解説
TSubclassOf | Unreal Engine 4.27 ドキュメンテーション | Epic Developer Community
自分の記事