At the start of a level, I want to attach something to the closest vertex of all nearby colliders. So I use Physics2d.OverlapCircleAll to get all nearby colliders, then I use a foreach loop to iterate through the colliders and a nested foreach loop within to cycle through the verticies of each collider, checking the distance within the 2nd loop.
However I don’t know how to cycle through the vertices that each collider2d consist of. If col is a polygonCollider2D, I thought it would either be col.poly.paths[0] or col.colliderInfo.verticies, but neither of those work. I realize that how to do this will vary depending on the collider, but right now I’m interested in the polygon collider.