How to change Texture of a character and keep animations

I would like to do the above but you can change the texture back with key 1 and change to differnent on key 2 and be able to switch back and forth. How can I do that? Thanks!

Use this in a script attached to your character’s mesh

var mat1 : Material;
var mat2 : Material;

function Update () {
    if(Input.GetKeyDown("1")) {
        renderer.material = mat1;
    } else if(Input.GetKeyDown("2")) {
        renderer.material = mat2;
    }
}

renderer links to the attached Mesh or Skinned Renderer. So you need to put this JavaScript onto the Mesh object for it to work.
render.material is the first material on the renderer’s list, if you have multiple materials that is a different story.