I have a frog in my 2d game. It has an attack where it sticks its tongue out. I didn't make an animation for this, I made tongue fragment prefabs that spawn one after another. They obviously start at the frog's mouth. I want to make it look somewhat realistic, but since there are despawn timers in the tongue fragments, the tongue starts to disappear from the start of the tongue to the end of it. Is it possible to make them despawn with code in the prefab that spawns them?
I stated what I tried and what I expected in my details section.