I have a weapon class and in the header I am defining an enum that I would then like to include in a struct.
Code:
namespace EWeaponType{
enum Type{
Primary,
Secondary,
Tertiary,
Shield,
};
}
USTRUCT()
struct FMWeaponData{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditDefaultsOnly, Category = Usage)
EWeaponType::Type WeaponType;
.... ....
// defaults
FMWeaponData(){
WeaponType = EWeaponType::Primary;
.... ....
}
};
This is tossing "Unrecognized type ‘EWeaponType’ error at the line "EWeaponType::Type WeaponType;"
This is in the header later so the struct will appear in the blueprint for customization…
// weapon data
UPROPERTY(EditDefaultsOnly, Category = Config)
FMWeaponData WeaponConfig;
I want to be able to define the values of this struct in the Editor when making blueprints for each weapon.
What am I doing wrong here?
Thanks!