Declaring a function with c++ macro

I feel like that’s because UPROPERTY is parsed by the Unreal Header Tool before C++ compiler handles the macro

That’s definitively possible. Maybe try to put the ATTRIBUTE_REPLICATE_FUNCTION and ATTRIBUTE_ACCESSORS before the UPROPERTY declaration, but I don’t think it will work…