|
hi 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. I asked some people about this on the holy internet but i cant get this instantiate working. could someone help me with this. im not a pro @ javascript or scripting. but i know a little bit
(comments are locked)
|
|
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)
(comments are locked)
|
|
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? oke i need a parent with all the scripts attached to it. how can i switch between these children? ab_cee 0 secs ago
Jun 15 '10 at 11:50 PM
ab_cee
(comments are locked)
|
