Trail renderer stay after being disabled (or something like that)

I have a problem. My logic is this: when an enemy car enters into a ‘isTrigger’ collider, it begins to skid. It leaves a trail on the ground, which is a skid mark. When the car exits the collider, the trail rendered is disabled with

object.enabled = false

As soon as the trail renderer is deactivated, the marks disappear. This doesn’t look nice to the car behind. Is there a way to leave the marks on let’s say 10 seconds after disabling the trail renderer component?

I don’t mean this:


I mean something to do with code. Or maybe I should never disable the component, maybe I should resize the marks to 0 and then on enter back to normal? I don’t know what to do. If this sounds like a good idea, please show me how to do it using code.

Here is a screenshot of the situation:

As soon as the Bugatti finishes the turn, the marks on the right will vanish.

Maybe you could use something like

yield WaitForSeconds (10)
object.enabled = false

in a seperate function. This will make it wait 10 seconds before deactivating. It may not be what you are looking for, but it may help.