Hi, How can I add several times the same component to a gameObject?
for (i=0;i<4;i++){
gameObject.AddComponent ("GUITexture");
var gui:GUITexture=new GUITexture();
}
i see the error:
“Cant add component ‘GUITexture’ to GameObject because such a component is already added to the game object!”
thx
If you get an error saying you can’t do it, then you can’t do it. The only components I can think of offhand where you can have multiples of the same thing on a single game object are audio sources and scripts.
–Eric
I noticed you can have more than one fixed joint on a single gameobject too. Don’t know any others off hand