解决UE4编译时UCLASS()显示语法错误的方法

当UE4项目出现UCLASS()语法错误但实际能编译通过的情况,可以尝试切换到DevelopmentEditor配置编译,再切换到DevelopmentGame配置编译。这将使IntelliSense重新编译头文件,问题通常可以得到解决。
摘要由CSDN通过智能技术生成

原帖地址: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()声明前

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值