I’m trying to create a simple struct in my actor header file that was just freshly created in unreal editor using the
“add code to project” menu:
USTRUCT(BlueprintType)
struct FDamage
{
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Damage)
double damage = 0;
};
but whenever I add GENERATED_USTRUCT_BODY()
to my struct, Xcode gives me this:
If I comment out GENERATED_USTRUCT_BODY()
Xcode doesn’t report any syntax errors, but won’t compile obviously due to needing GENERATED_USTRUCT_BODY()
. I’m running OSX 10.10.3, Xcode 6.3.2 and UE 4.7.6 (all latest). Why is Xcode giving me this error?
If it helps, here are the full cpp and header files (literally just created with the unreal editor)
Weapon.h:
Weapon.cpp (untouched):