// 4.20版本的需要找到工程的.Build.cs文件(\Source\ProjectName\ProjectName.build.cs)
// 在PublicDependencyModuleNames数组里,添加"NavigationSystem"
// PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "NavigationSystem" });
// C++代码如下:
// #include "NavigationSystem.h"
// UNavigationSystemV1* NavMesh = FNavigationSystem::GetCurrent<UNavigationSystemV1>(this); |