#if XXX
{
// 自己的代码
}
#endif
在UE编写C++的时候如果 XXX 宏定义没有定义会报错
Error C4668 : 没有将“XXX”定义为预处理器宏,用“0”替换“#if/#elif”
这时候在 .Bulid.cs 加上 bEnableUndefinedIdentifierWarnings = false;
UE5.5 使用 UndefinedIdentifierWarningLevel = WarningLevel.Off;
这样只要宏定义没有定义, 会默认是0,编译的时候就不会编译定义范围。