I'm trying to create GUITextures on the fly but I keep on getting this error ->
"Can't add component 'GUITexture' to something different because such a component is already added to the game obejct!"
Here is an example of test code what I'm trying to accomplish
the error appears when gameObject adds a component the second time.
I don't really understand because you can attach many GUITextures components through the editor?
I would really appreciate if some one could possibly explain to me why this does not work.
asked Dec 03 '10 at 05:28 PM
You can't add multiple GUITextures to a single GameObject in the editor either
If you're doing GameObject > Create Other > GUI Text, it's creating a new GameObject each time
What you could do is something like this:
answered Dec 03 '10 at 05:32 PM