I am creating multiple instances of a silver foil balloon. I need each balloon to use a different image from a web cam. I thought the easy way to do this would simply to be update a jpg out side of Unity and then the instance would simply use that new image when the next one was created. But all the instances change to the new image.
How do you create a different texture for each instance?
Maybe use your large texture with all the webcam images tiled into it, then use the Material TextureOffet and TextureScale to select which parts of the texture to use. If you had say 16 webcam images in a 4x4 grid, then you’d use a TextureScale of 1/4 (0.25) and then the offsets would be 0.0, 0.25, 0.5, 0.75 in each direction. See http://unity3d.com/support/documentation/ScriptReference/Material-mainTextureScale.html for a code example.
The simplest way to load images in-game is to use the WWW class - it can read files or web content - this let’s you load new textures. Once youre loading new images and assigning to mainTexture, the gallons will end up with their own textures and your other problem will go away. Start reading here: http://unity3d.com/support/documentation/ScriptReference/WWW.html