how can i make ingame object creation/level editor?

i want a function in my mobile game through which user can move his finger across the screen to make an object.the object can be any shape that user makes like a line a box or circle.the object should also have physical properties.Very similar to like the game Brain it on.
its seems simple but as i am a beginner i dont know the exact way to do so
kindly plz give any link to a tutorial or explain yourself.
Thanks

Hi! Well regarding your input you can check this :

Scripting:
For a line :

  1. Return the initialPos of the screen where you touched.
  2. Return the endPos of the screen where you touched.
  3. Create a line renderer (You first need to create a GO or include the Line to a current GO)
    Unity - Manual: Line Renderer component
  4. Assign the initialPos and endPos to the Linerenderer .
  5. Set the linerenderer to useWorldSpace = false
  6. Assign material you want
  7. Add Rigidbody to the GO that contains the line to add physics properties.
  8. Add what you want etc.

For a box, circle

  1. Get the pos of the touch
  2. Create a primitiveObject in that pos
    Unity - Scripting API: GameObject.CreatePrimitive
  3. Add Rigidbody for physics