GetRandomReachablePointInRadius always return false

Why this function is always returning false?
I can’t understand, I have a nav mesh right on the player start position… I add NavigationSystem to build file cs.
So what is missing?

void UCubeGeneration::BeginPlay()
{
	Super::BeginPlay();
	UWorld* world = GetWorld();
	if (world) {
	UE_LOG(LogTemp, Log, TEXT("Got world. Now trying to find nav area for random loc..."));

	UNavigationSystemV1* NavigationArea = FNavigationSystem::GetCurrent<UNavigationSystemV1>(this);

	if (NavigationArea) {
		UE_LOG(LogTemp, Log, TEXT("Found nav area"));

		const FVector startPosi = world->GetFirstPlayerController()->GetPawn()->GetActorLocation();
		

		UE_LOG(LogTemp, Error, TEXT("Test navArea: %s"), *NavigationArea->GetPathName());

		FNavLocation endPosition;
		UE_LOG(LogTemp, Error, TEXT("Start position: %s"), *startPosi.ToString());

		if (NavigationArea->GetRandomReachablePointInRadius(startPosi, 1.f, endPosition)) {

			UE_LOG(LogTemp, Error, TEXT("Found new random loc: %s"), *endPosition.Location.ToString());
		}
		else {
			UE_LOG(LogTemp, Error, TEXT("Random loc failed!"));
		}

	}
	else {
		UE_LOG(LogTemp, Error, TEXT("Couldn't get nav area!"));
	}

}
else {
	UE_LOG(LogTemp, Error, TEXT("Couldn't get world!"));
}
	
}

Hello, did you found a solution?

How about you @slam.js ?
I am trying to make my enemy walk to a random location but it always returns false.

auto NavigationSystem = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
FVector ActorLocation = MyCharacter->GetActorLocation();
FNavLocation RandomPoint;
// PatrolRadius is set to 1000.0f
bool bHasRandomPoint = NavigationSystem->GetRandomReachablePointInRadius(ActorLocation, PatrolRadius, RandomPoint);
if (bHasRandomPoint)
{
	// Never logs this.
	UE_LOG(LogTemp, Display, TEXT("Found a random point to Patrol to"));
}
else
{
	// Always logs this. Character is in open space with a navigation mesh underneath.
	UE_LOG(LogTemp, Display, TEXT("Did not find a random point to Patrol to"));
}

I solved the problem by placing a NavMeshBoundsVolume.

In the editor, you can see the NavMesh by toggling the P key for debugging.
Make sure the character is on a NavMesh.