How to determine path is not reachable to vector?

How to determine path is not reachable to vector?

What I Want:

  1. Start path to some vector(called Target)
  2. Determine if path to Target is not reachable. (Without using PathUtility, because I am only using vector)

What I did:

  1. Used StartPath function to make path to Target
  2. Used if(path.error) to determine if there is no path.

What actually happend:

  1. Path is always ‘Complete(Success)’ even there is no way to reach to Target
    (path doesn’t have error)
  2. Due to 1, AI keep moving to same node. Will not forever.

https://www.youtube.com/watch?v=9Hs-jIWKaF0
See this video


Like the Image above, It surely looks theres “No Path”. But we can actually start path, but it will never reach to Target(Blue Flower above)


Source Code

I don’t quite understand why you don’t want to use PathUtility.IsPathPossible? That seems like the perfect solution for you.