take 200 instantiatios of a prefab with 5 textures.
if you use renderer.material to set your material, you get 200 instances of materials
If you do 5 different renderer.sharedMaterial you get one material maximum for all 200 instantiations, the last one applied.
you can’t easily change texture on a prefab at all in code if you want to be computationally efficient. it seems impractical, you have to create five copies of the prefab with each material and then copy those copies. and if you do that, you have to instantiate new objects for the sake of duplicating the material even though you don’t need them in the game to begin with. which is impractical.
So it seems simpler to make 5 prefabs all with different textures, and yet that’s a long way around.
I think I have to make a new GameObject for each texture in code, and Instantiate different game objects.
in what way should a small number of textures be applied to many copies of a GameObject?copies of copies? make multiple root GameObjects? use multiple materials for each GameObject and then go through them with an array sharedmaterial?