按照官网的更新说明,更新了NavigationSystem ,但是下面代码还是报错
#include "NavigationSystem.h"
UNavigationSystemV1* NavMesh = UNavigationSystemV1::GetCurrent(this);
if (NavMesh) {
const float SearchRadius = 1000.0f;
FNavLocation RandomPt;
const bool bFound = NavMesh->GetRandomReachablePointInRadius(Bot->GetActorLocation(), SearchRadius, RandomPt);
}
报错:
AIEnemy.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl UNavigationSystemV1::GetRandomReachablePointInRadius(struct FVector const &,float,struct FNavLocation &,class ANavigationData *,class TSharedPtr<struct FNavigationQueryFilter const ,1>)const " (__imp_?GetRandomReachablePointInRadius@UNavigationSystemV1@@QEBA_NAEBUFVector@@MAEAUFNavLocation@@PEAVANavigationData@@V?$TSharedPtr@$$CBUFNavigationQueryFilter@@$00@@@Z) referenced in function "public: void __cdecl AAIEnemy::SearchNewPoint(void)" (?SearchNewPoint@AAIEnemy@@QEAAXXZ)
|