How to edit PolygonCollider2D vertices IN CODE?

Hi,

So I understand that I can edit the polygon collider in the editor using shift, but what if I want to edit it during runtime via code? If editing them is not possible, surely I can at least see location of each vertex of the collider?

I am trying the below and getting the following error:

foreach (Vector2 vert in col.poly.paths[0])
error: Type `UnityEngine.Collider2D' does not contain a definition for `poly' and no extension method `poly' of type `UnityEngine.Collider2D' could be found (are you missing a using directive or an assembly reference?)

Where col is a PolygonCollider2D

PolygonCollider2D polygonCollider = GetComponent();

    polygonCollider.points = new [] { new Vector2(-Constants.cCellSize/2f,-Constants.cCellSize/2f), new Vector2(Constants.cCellSize/2f, - Constants.cCellSize/2f), new Vector2(Constants.cCellSize/2f,Constants.cCellSize/2f)  };
        polygonCollider.SetPath(0, new []
        {
            new Vector2(-Constants.cCellSize/2f,-Constants.cCellSize/2f), new Vector2(Constants.cCellSize/2f, - Constants.cCellSize/2f), new Vector2(Constants.cCellSize/2f,Constants.cCellSize/2f) 
        });