im still having trouble with swapping my objects.
im using this code to spawn a new 3d object(the spawning works with a prefab)
now i want to destroy my old 3dobject. The new 3dobject needs to be spawned at the same spot as the old 3d object was.(just like a swap)
The scripts from the old 3d obj needs te be copied to the new 3d object.
asked Jun 15 '10 at 11:38 PM
The scripts are instantiated with the new prefab. I think you mean the variables that go with that script (the 'settings')?? If so, you should assign them across maybe something like this:
and then destroy the old object (or at least deactivate it)
answered Jan 13 '11 at 11:16 PM
Any reason you can't just spawn two objects, have them share a parent that moves around, and just enable one/disable the other when you need them to swap?
answered Jun 15 '10 at 11:42 PM