Line Renderer to 3d model

I need to get the line renderer and use it to stretch and rotate a prefab to fit it (like in sims when you click and drag to make a wall), can this be done in the game and not the editor? I am an absolute noob. I am also using Unity version 2019.1.12f1.

Read unity docs API about it. If there are properties of an object you can access them through scripts.

I added some scripts and now it acts like the line renderer but makes walls, if anyone wants to know how i achieved this then ask me