- Home /
Question by
giogio_17 · Jul 15, 2014 at 10:05 AM ·
gameobjectinstantiateclone
Clone Selector
Hi unityAnswer's Users!
I need help about question of clone. I have a script that generates a new clone every time you touch an object. Can I do, with a script, to assign each of these clones a different value of the same variable?
thanks!!
Comment
Answer by Kiwasi · Jul 15, 2014 at 10:06 AM
Yes
GameObject clone = Instantiate (...);
clone.GetComponent<MyScript>.myVariable = 4;