I am indeed trying to reference the class so i can spawn projectiles of the given type. I am actually trying to do the same thing for my PlayerCharacter with a set of weaponry that need to spawn and attached when selected, and of course then take input (fire, altfire, reload… etc) from the PlayerCharacter. Could you give me a indication if this is the right setup for such an endeavor? I am kinda stuck on this atm :S the following seems not to be allowed:
//PlayerCharacter.h:
UPROPERTY(EditAnywhere, Category = "Weapons")
TArray<TSubclassOf<AWeaponBase> > Weapons;
//PlayerCharacter.ccp:
AWeaponBase* CurHoldingWeapon;
CurHoldingWeapon = GetWorld()->SpawnActor<Weapons[0].GetClass()>;