How to make game like Line

HI,
I want to make a game like Line, I have figured out how to make rest of game but I don’t know how to make line like in this game?

I make it by using trail renderer but trail renderer only works with moving object, But my object will be static along x-axis and only moving along y-axis

[- YouTube][2] [2]: - YouTube

You can make the dot move through the level and use a trail renderer, the Camera’s x-position needs to be kept relative to the x-position of the ball.

This way the ball is actually moving through the level and creating a trail while the camera keeps relative to the ball(allowing the illusion of the ball staying in the same X position on screen.)