Texture change on multi material character

Good day!
I’m trying to trigger different face textures using animation events. I’ve tried using different variables, from gameobjects (the player) to materials.
I’ve checked several threads on Unity Answers, but all answers are scripts that point to the mainTexture, which it does anyways by default…

I mean, the script I have now works, as far as triggering texture changes from the animation. But it changes the wrong texture!

Any ideas of how to solve this would be appreciated, thank you!

var mat : Material;

as well as Materials[];
and then call Materials[2]; in the script.

none of those work, and I get unassigned bugs from them.

I have also tried making a custom shader for the part of the character I want to change the texture of, and changing the standard Properties _MainTex to “_FaceTex” and then call that in the script, but that doesn’t work either!

this is what I have right now, what it does is changing the texture of the first texture it can find, rather than the one I’d want it to change.

var player : GameObject;

var neutral : UnityEngine.Texture;
var angry : UnityEngine.Texture;
var scream : UnityEngine.Texture;
     
     
     
function FaceNeutral () {
	player.renderer.material.mainTexture = neutral;
}
function FaceScream () {
	player.renderer.material.mainTexture = scream;
}

I think this is what you are looking for http://docs.unity3d.com/Documentation/ScriptReference/Material.GetTexture.html

This is how you can access named textures from the material. I am assuming your shader or material has some texture samplers that are named faceTexture, bodyTexture or something along those lines and maybe you just want to change the face texture. Hope this helps - R