Changing material on a prefab at run time

Hi,

I want to change a material at run time:
the structure of the prefab is : the_prefab and a child

I want the child material to change:

var bash : Material;

function Awake(){

if(gamemanager.who==1){
//find the child
var victim=transform.Find("baby").gameObject;

//assign new material to baby

victim.renderer.material=bash;

print (victim.renderer.material);
//it prints the correct material but nothing changes
}
}

I double check the bash material it has a different texture
also I assign the bash material in the inspector.

Thank you

This is a common question. Often asked with incorrect terminology.

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=unity+change+material