I destroyed a wall and i need to create the same wall after few seconds or to create it again after the character pass it.
Technically, you cannot recreate a destroyed object unless you have a reference to a prefab of the same object.
You can, however, do one of these:
- Instead of destroying it, make it inactive, and then active again later.
- Instead of destroying it, move it out of the way.
- Have a prefab of that wall somewhere you can access (either on the same object that destroys it, or at some other “wall factory” object).
There are probably other ways to achieve this, but I would start with one of these unless you have a specific reason not to, in this case, please elaborate more.