Very basic question here…
I have this line of code
thisCube1.gameObject.renderer.material.color = Color.red;
but I want to define the first part… eg some times I want thisCube1, another time I want thisCube2…
Coming from PHP background I just try and do something like
int i = 1;
thisCube(i).gameObject.renderer.material.color = Color.red;
But this doesnt work… I cant just use a else statment as I am planning to generate a random number from 1 to 200 to get it to randomly control cubes.