C2618 compile error UPROPERTY

Hi,

I’m running into some weird compile error and I’m currently clueless on what is causing it.

I have a class derived from UDataAsset with the following member:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Effects")
	TArray<FSkillSpecialEffectData> SpecialEffects;

Everything compiles fine.

When I try to add this member:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Player\|Casting")
		bool RotateCasterToDirectionKey = true;

I get the following compile error:

Data/Structs/Skills/SkillSpecialEffectData.h(30):
error C3646: ‘ScaleWithStat_StatType’:
unknown override specifier
Data/Structs/Skills/SkillSpecialEffectData.h(30):
error C4430: missing type specifier -
int assumed. Note: C++ does not
support default-int
Intermediate\Build\Win64\UE4Editor\Inc\PM\SkillSpecialEffectData.gen.cpp(114):
error C2039: ‘ScaleWithStat_StatType’:
is not a member of
‘FSkillSpecialEffectData’
Structs/Skills/SkillSpecialEffectData.h(13):
note: see declaration of
‘FSkillSpecialEffectData’
Intermediate\Build\Win64\UE4Editor\Inc\PM\SkillSpecialEffectData.gen.cpp(114):
error C2618: illegal member designator
in offsetof
Intermediate\Build\Win64\UE4Editor\Inc\PM\SkillSpecialEffectData.gen.cpp(114):
note: offsetof has a builtin meaning;
use /Zc:offsetof- to revert to old,
non-conforming definition

If I remove the UPROPERTY tag from RotateCasterToDirectionKey, it again compiles fine.

Does anyone have any idea why this is happening?
Thanks.

What do you have on the header at line 13 and 30?

What do you have on the cpp at line 114?

does it compile if you remove the \ from the category on

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Player|Casting")
bool RotateCasterToDirectionKey = true;

We are discussing it on forums if you want to follow up here: