原帖地址:https://answers.unrealengine.com/questions/299013/uclass-error.html
If it compiles correctly, even when IntelliSense is complaining, do this:
Change to DevelopmentEditor configuration, compile; Change to DevelopmentGame configuration, compile. This gets IntelliSense to recompile and rescan headers and everything works fine again.
This often happens when you alter the lines in your .h code, above the declaration of UCLASS but it can affect other types too.
如果编译正确但显示语法错误,可尝试:
在DevelopmentEditor模式下编译一遍,再在DevelopmentGame模式下编译一遍,这样做一般能恢复正常
这种情况一般发生于当你更改.h文件的代码后,一般发生于UCLASS()声明前