|
I am wanting an objects texture to cycle through over time and I have this working on objects with only one material attached but need it to work on an object which has more than one material. How do i refer to the particular material? It won't allow me to use This is the entire script: var delay = 1.0; var textureCounter = 0; function Start () { InvokeRepeating("CycleTextures", delay, delay); } function CycleTextures () { textureCounter = ++textureCounter % textures.length; renderer.material(0).mainTexture = textures[textureCounter]; } thankyou
(comments are locked)
|
