Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Change sprite color when hit

Discussion in 'Animation' started by tkdguralswjdgood, Aug 23, 2021.

  1. tkdguralswjdgood


    Aug 12, 2019
    Sorry about my poor english. And this is my first post. I want to change sprite's color to red and back to normal slowly when hit. So I made "Player_hit" animation that change sprite's color property.
    But the problem is, I also have Player_right, Player_left animation for player's movement. So when Player_hit animation playing, Player_right and Player_left animation stops instantly and it looks wierd. I don't want this to happen.
    Do you have any idea how to play both animation at the same time, or is there other ways to do it? I need your help. I'm struggling with it for 5 days.
  2. KalOBrien


    Unity Technologies

    Apr 20, 2021
    Hey this may be better suited in as a scripting question.

    I recommend changing the sprite color via a script versus animating it manually. That way you can avoid the quick flash away from it.

    This is a great tutorial showcasing what I mean: