I am looking for the closest level on navmesh within the editor. The Navigation is constructed however this technique is at all times returns false with any extent. Additionally, UNavigationSystemV1::GetMainNavData() is at all times nullptr. Is it attainable to entry navdata in editor?
UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
ANavigationData* NavData = NavSys->GetDefaultNavDataInstance();
if (!NavSys->ProjectPointToNavigation(CoverPosition, ProjectedPosition, FVector(2.f * CapsuleRadius, 2.f * CapsuleRadius, 2.f * StandCoverHeight)))
{
return false;
}
CoverPosition = ProjectedPosition.Location;