determining whether there exists a path in unity 2d

Hey everyone
I’m making a 2d game where a script should determine whether there exists a possible path between to points (illustrated in images attached). As I understand raycasting would not work in this situation and pathfinding doesn’t support 2d. I don’t even know how to start scripting and I would appreciate any help.
Thanks in advance.

If you are still looking for a way to implement this functionality, I suggest to have a look at this: YouTube A* Pathfinding Tutorial.

The full series of videos includes explanations about the algorithm, actual code to implement it in Unity as well as many useful improvements.