I am trying to add projectiles to my game (bullets that my gun will shoot). I want them to deal damage obviously so I initialized it as followed:
/** type of damage */
UPROPERTY(EditDefaultsOnly, Category = WeaponStat)
TSubclassOf<UDamageType> DamageType;
/** defaults */
FProjectileWeaponData()
{
ProjectileClass = NULL;
ProjectileLife = 10.0f;
ExplosionDamage = 100;
ExplosionRadius = 300.0f;
DamageType = UDamageType::StaticClass();
}
The last line DamageType = UDamageType::StaticClass(); I get an error that says
"Error: Incomplete type is not allowed"
When I try and run anyways I get the error
"error C2027: use of undefined type 'UDamageType'"
I am using unreal engine 4.4.3 if that helps at all. If anyone knows what is going on please let me know. Thanks for the help!