I’m trying to create a simple object with 10 different textures showing different stages of decay as the player shoots it.
I set the textures as public textures:
public Texture Phase1; (all the way to 10)
After every hit I change the texture:
renderer.material.mainTexture = Phase2;
I’m setting up public textures. I know I can do that as an array, but I’m not sure about syntax.
Same for changing the material after every hit. I know I can have a variable I increase by one after every hit. So if it’s “x” then all I have to do after every increase is write something like:
renderer.material.mainTexture = Phase+x;
Though I know the syntax is all wrong and it doesn’t work. :-/