Changing Material on Children objects.....HELP

Hi Folks, Apologies for newb question but I wonder if anyone can help?
I have a 3D model/animation from 3DS max which I want to set up in Unity so that onMouseDown it clicks through an animation sequence and changes some texture maps on children objects along the way. I have set up a switch statement and have the animation sequence working as click through but am having problems switching the textures on the children objects…
So one case would read:

case 1: animation.Play(“SpinToCamera”); renderer.material.mainTexture = FPTexture;
currentAnimation++;
break;

However I can’t access the children from here to change their texture eg:
Childx.renderer.material.mainTexture = FPTexture;
or
Parent.Childx.renderer.material.mainTexture = FPTexture;

I’m sure I’m missing something obvious but would appreciate any pointers as this is how I’d hobble some code together to do similar stuff in other packages?

Many thanks,
Mike
:slight_smile:

sorry - should have added that it’s just jpegs which I’ve added to the project that I’m trying to switch.

cue tumbleweed!

So I found this for any other newbies who are struggling…
http://answers.unity3d.com/questions/6383/how-to-change-a-specific-material-when-the-mesh-has-more-than-one-material

which helps me access sub materials at least…

I’m guessing that the chage texture for children code should be applied to the child objects and be initiated when the click counter on the parent object is incremented…