# How to leave a permanent skidmark on the ground in unity2d

I am working on a 2D driving game.I have a sprite of a car.Set the car movement.Now I need to create a skid mark on the ground for that I have created a empte game object and added Trial Renderer component and set the skid mark material to it.The problem is that when i start moving the car ,the skid mark follows the car as if that a skid mark is attached to the car.

Is there any simple way to leave a permanent skid mark on the ground in unity2d. Can anybody please help me

Create a prefab for the skidmark. When you want to draw a skidmark to your scene, you would instantiate this prefab.

List<GameObject> Skidmarks = new List<GameObject>();

...

//instantiate the prefab
GameObject skid = GameObject.Instantiate(Resources.Load("SkidMark")) as GameObject;

//Set some properties
skid.transform.position = NewPosition;
skid.transform.rotation = NewRotation;

//keep reference of all skidmarks