ue4.20 NavigationSystem 更新
4.20里面导航系统的引入头文件改变,而且类名改变以下是官网4.20的Release Notes
Navigation
New: Most Navigation System-related code has been moved out of the Engine code and into a new Navigation System Module. Game-specific code using navigation system functionality might need to be updated.
Include statements need to be updated (the removal of the AI/Navigation part of the header files path should be sufficient).
NavigationSystem class has been renamed to UNavigationSystemV1.
链接如下
https://docs.unrealengine.com/en-US/Builds/4_20
新版代码写成:
#include "NavigationSystem.h"
UNavigationSystemV1* NavMesh = UNavigationSystemV1::GetCurrent(this); // 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); 感谢分享! 感谢分享
页:
[1]