MoveDirectlyFoward fails on promoted with no navmesh, TWeakObjectPtr of AbstractNavData is not valid for non-navmesh queries

My team just merged with latest promoted post navigationcomponent refactor.

First small/minor bug: in AAIController::MoveToLocation bUsePathfinding is not being passed through to PreparePathfinding.

Second: The FPathFindingQuery NavData always fails IsValid when that weak pointer property is assigned or constructed from the default AbstractNavData from the NavigationSystem.

Our use case is making a character move via movedirectly toward task while not on navmesh. The NavData Query is invalid so its assigned to the default navmesh navdata via GetMainNavData(FNavigationSystem::DontCreate).
Since its not on navmesh it doesn’t ever get to execute AAbstractNavData::FindPathAbstract and errors out.

This is blocker for some of our AI.

This could be a simple problem or engine issue as I tried created a local TWeakObjectPtr of navdata right after the abstractNavData was spawned and created in UNavigationSystem::DoInitialSetup() via:
TWeakObjectPtr data = AbstractNavData;
The data Ptr will still fail IsValid even when non-null.

Hey,

I’ve already fixed that on Dec 29, but it made it to master branch only three days ago so I guess it still not in the promoted branch.

Cheers,

–mieszko

Alright, thanks I’ll merge it in.