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