Search Unity

Resolved [2D] How to play two animations simultaneously?

Discussion in 'Animation' started by EddieFromIndia, Jun 3, 2020.

  1. EddieFromIndia

    EddieFromIndia

    Joined:
    May 2, 2020
    Posts:
    11
    Hi,
    I have a flying bird animation with 7 sprites, each of them with a different wing position that will play all the time. The bird is a prefab.
    I want to add a gun that will come out of the bird every 2-3 seconds later and shoot a bullet. I have nested the gun to the bird prefab and added an animation to it, changing it's position.
    Now, I want to play the gun revealing animation irrespective of the bird flying animation. I mean the flying animation must go on, and the gun revealing animation must play in parallel without changing the other animation.
    How can I achieve this?
    Thanks in advance.
     
  2. EddieFromIndia

    EddieFromIndia

    Joined:
    May 2, 2020
    Posts:
    11
    Solved!
    I have just nested the two game objects in an empty game object, so that the animation of one object does not affect the other. That was easy. I wonder why I didn't think of that before.