Strange compile error when adding UPROPERTY

Very old thread, but I’m having this same issue where ANY USpecifier breaks compilation after a certain number of them. It happened after I added UI derived classes to my project. After a certain amount my forward declarations (even one to engine class ACharacter*) break.

It has something to do with UHT creating a new makefile, as if I simply build, it will compile. But when a new makefile is creating in a rebuild or by deleting intermediate+binaries forward declarations break.

It also happens to any class, I’ve commented out old USpecifiers (UProperty or UFunction or UClass, doesn’t matter) and was able to add a new one, but if I add more than I commented out compilation breaks.

I wonder if @Zhi_Kang_Shao was right about Unity Build, as the compiler stills claims I have a circular dependency on a class I long since fixed. Edit: Unfortunately it did not.

Hoping I can find the fix as I’m stuck dead in the water otherwise (can’t add new classes).

In case anyone comes across it, the fix is to force unity rebuild by renaming the variable or changing the line that the variable is on after adding/commenting out a UPROPERTY macro.