How can I make the polygon collider 2D not go off the edge

Hi, I’m using the polygon collider to make the character collide with my ground, but it goes off the edge, is there a way to fix this? (here is a screenshot of what I mean)

I can suggest a rather lengthy but working way. You can edit the collider manually, just click on this button:

181445-editcollider.png

And then arrange the collider vertices as needed.