How to generate destroyed game object in unity?

I want to that generate destroyed Unity prefabs.How can I ensure it?

Are you talking about a “destroyed” version of another object? It’s just like any other prefab. Make it look how you want to look, and then Instantiate it when the original object is destroyed.

Actually ,I want to copy destroyed game objects and when game object completed purpose of itself,I want to destroy its.

You can have like a timer or something like that, I think this is called Living time

Good suggestion .How can I apply to my script?

First you have to add an Idd or a Float

Then make the the number of the Idd or Float is the time that you want that this object live

This step should look like this public float livingTime = 3f;

And also put this code in your script private float _startingTime;

And you put this last code
float _timeSinceStarted = Time.time - _startingTime;
float _percentageCompleted = _timeSinceStarted / livingTime;

With that it should work

Thanks for code explaining.Have a nice day.