- Home /
animation with different sprite images
hey all so in my game i have a ball as the player but i want to set different images to it so that the user can choose witch ball he want and i pretty much managed to do this... but when i set an animation to the player that is triggered when he's dead, but if the animation is enabled i can't change the ball image so is there a way to overwrite the animation or should i just disable it ???
Detailed:
i have a ball as the player as i said with an animation component that turned the ball grey when dead and it was working fine but then i wanted to add an option to change the ball image using this code in the script :
public sprite blue;
void update(){
this.gameObject.GetComponent<SpriteRenderer> ().sprite = blue;
}
but when the animation is on this don't make any changes to the image
is this better explanation bro ? if u still can understand tell me to explain even more...
Your answer
![](https://koobas.hobune.stream/wayback/20220613183652im_/https://answers.unity.com/themes/thub/images/avi.jpg)