- Home /
Same script on multiple objects
I have a array with 14 elements. I want to take a element and delete it after taking it. But i want to do it with 14 different objects that have the same script. What happens is that all of them take simultaneously the first element. Is there a way to make the first object take the first element,the second object to take the second element.... But all object to have the same script.
Sorry for my English...
can you elaborated this, "I want to take a element and delete it after taking it."
a for(;;) in your array and another array of the elements you want to take, then for every one of them use a getcomponent
Answer by Tiras69 · Jan 10, 2014 at 12:39 PM
I'm not sure of what you want to do but I think you can go see that. http://unity3d.com/learn/tutorials/projects/roll-a-ball/collecting-and-counting