Hi Guys
I have a prefab and 5 or 6 of its instance on the scene. There is a move script attached to the prefab with a variable. How can I accesse to every single instance of the game object and change the variable in the same time? GameObject.Find/FindWithTag seems to find only one of them but not all with the same name. If you have any idea can you help me in Javascript please? Thanks Jozsef
Javascript is NOT Java!!!!! Spread the word!
– flaviusxviiyou can use var example = GameObject.FindGameObjectsWithTag("object"); and what it does is search for all the objects that have that tag and you access to this using example[0].blablabla
– Uriel_96(sorry for 2 comments) http://unity3d.com/support/documentation/ScriptReference/GameObject.FindGameObjectsWithTag.html
– Uriel_96