Search Unity

Bug EndFindPath() returns PathQueryStatus.PartialPath when there is no path

Discussion in 'Navigation' started by Dinamytes, Nov 5, 2020.

  1. Dinamytes

    Dinamytes

    Joined:
    Nov 3, 2016
    Posts:
    51
    First reported here.
    I have tested before some time ago and was returning OutOfNodes on UpdateFindPath, now it isn't (2020.2.0b9)
    Code (CSharp):
    1.             var status = query.BeginFindPath(Location, DestinationLocation, UnityEngine.AI.NavMesh.AllAreas);
    2.  
    3.             status = query.UpdateFindPath(maxIterations, out int _);
    4.  
    5.             if (status != PathQueryStatus.Success)
    6.             {
    7.                 return;
    8.             }
    9.  
    10.             status = query.EndFindPath(out _WaypointsCount);
    11.  
    12.             //PathQueryStatus.PartialPath when there is no direct path
    13.             if(status != PathQueryStatus.Success)
    14.             {
    15.                  return;
    16.             }
     
    Last edited: Nov 6, 2020