Search Unity

Help with 2D Animation

Discussion in 'Animation' started by IceColorGames, Jul 9, 2021.

  1. IceColorGames

    IceColorGames

    Joined:
    Apr 23, 2020
    Posts:
    5
    I feel like I'm overlooking something super simple here, and I didn't know where else to turn, so here we are!

    I'm currently trying to create a game where I'll have multiple animations for one GameObject (think a fadein, a fadeout, a slide out, etc.). None of them are player-controlled.

    Currently I have two animations attached in an "Animation" component on a GameObject, and only one of them plays when the GameObject is set to Active in the scene (it fades in). That part is fine. The next animation is meant to play when the player clicks anywhere on the screen. The issue I'm facing is that the animation will play, but it won't stay in the state it ended in - so the object enlarges, but it doesn't fade out and it goes back to its plain image form after the animation is done. I'm trying to get it to STAY faded out. It's hard to explain, but that's the best I can describe it.

    I have both an Animator and an Animation component on the same GameObject and the second animation is labelled as "Legacy", so I don't think that's the issue. I really have no idea what's going on. Any help is appreciated!
     
  2. IceColorGames

    IceColorGames

    Joined:
    Apr 23, 2020
    Posts:
    5
    I fixed it! It turns out one of my animations was in the Animator component and one was in the Animation component. I deleted the Animator and only used the Animations to call them instead of having one be called automatically.