I’m making a platformer, and made a few parts of levels, about 17 prefabs, and I’d like to know how can I generate them one after another and also destroy the ones I passed already.
and not only once but keep going forever (or until player dies)
You can check this tutorial from Unity Live Training: CREATING A BASIC PLATFORMER GAME. They provide with scripts too. They autogenerate Platforms, collectables etc.
Heres one more from Unity Live Training: LETS MAKE A GAME: INFINITE RUNNER