I have a prefab with a UITexture. I instantiate it 4 times. On each of the 4 instances I call a script on the prefab to change the texture using the WWW class and a URL.
Each of the 4 instances downloads the texture, then runs the code to change it.
uiTextureComponent
.material = new Material
(uiTextureComponent
.material.shader);uiTextureComponent.mainTexture = downloadedTexture2D;
However, the first texture changes 4 times in quick succession, while the other 3 remain black. Through breakpoints I have confirmed that each of the 4 instances is downloading its own texture. It's like the material or texture is shared among all instances when it should not be.
Thanks for the help.