UE4初学者教程:https://docs.unrealengine.com/zh-CN/Programming/QuickStart/index.html
问题:
FloatingActor.cpp文件各种标红但是能编译通过,说白了就是没有代码提示。
解决办法:
在`#include "FloatingActor.generated.h"`之前添加头文件(否则会编译失败):
#include "Components/StaticMeshComponent.h"
#include "UObject/ConstructorHelpers.h"
参考:
1. https://docs.unrealengine.com/en-US/API/Runtime/Engine/Components/UStaticMeshComponent/index.html
2. https://docs.unrealengine.com/en-US/API/Runtime/CoreUObject/UObject/ConstructorHelpers/index.html
3. 亲自实测,UE4.24.1+VS2017_15.9.18