Draw a line with a 2D collider via user input

I’m working on a 2D puzzle platformer where you have to draw your own lines to get through the game.

This is how a map could look for example without anything drawn on it

And this is how it could look with a line drawn

Because of the drawn line the player can now get over the cliff but how would I do something like this when I have to do it via mouse input (later touch input) and the line can max be lets say 2x0.1 and there can be a maximum of 3 lines drawn at a time.

There’s one asset I made that alows you to do that, it’s in the store, maybe you can check it out, Unity Asset Store - The Best Assets for Game Making.