Help me with this Pathfinding?

I’m trying to make it so when the player clicks a star (the little dots on the picture) it creates a path star-to-star to the designated star. All the stars randomly generated.

Would A* Pathfinding Project work for this if so could you help me with it?

If there’s an easier way or something please let me know.

I’ve been doing my whole project in C#. If you can keep it in C# thanks.

Screenshot

Thanks!

You could save pressed stars in an array. Then (if array exists) draw line from point to point using draw line Unity - Scripting API: Debug.DrawLine .