ue4.20 NavigationSystem 更新

[复制链接]
查看2974 | 回复3 | 2018-10-9 07:40:22 | 显示全部楼层 |阅读模式
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);
solairewrite | 2018-10-10 21:58:56 | 显示全部楼层
        // 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);
回复 支持 反对

使用道具 举报

fhuw838 | 2018-10-21 00:28:47 | 显示全部楼层
感谢分享!
回复

使用道具 举报

星沫同调士 | 2018-11-3 13:49:45 | 显示全部楼层
感谢分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

3

主题

139

回帖

671

积分

初阶编码师

积分
671