How can I change several objects in an scene from one to another? for instance lets suppose I have a ton of spheres and I want to change them all for cubes? and they are different objects? (not the same prefab)
Ok I finally figured this one by myself, so Im posting the answer for those who may be interested.
Short answer: you cant, You cant replace an object that is already on the scene with another, you can fake it, and get a pretty similar result though.
This is what you need to do
1.-Create a new prefab with the objects you want to "convert" from the scene (the cubes) lets call this "the list" 2.-Create another prefab with the final object you want to replace the originals(the sphere) lets call this "proxy" 3.-Now create an editor script that creates a new proxy in all the positions in the list (you can also copy other details like the script, textures etc)
4.-Delete all the original objects from the scene.
Thats it. Is a bit of a laborious task but is better than modifying all objects by hand (specially if you have 800 like me, dont ask)
I hope someone finds this useful.
answered Mar 10 '10 at 05:15 PM
Just made a blog post about the subject here http://zaxisgames.blogspot.com/2012/02/batch-replace-gameobjects-in-unity.html