Search Unity

how can i finish the animation first before destroying/disabling the animator?

Discussion in '2D' started by brunoenvia, Aug 18, 2019.

  1. brunoenvia

    brunoenvia

    Joined:
    Aug 5, 2019
    Posts:
    18
    how can i finish the animation first before destroying/disabling the animator? i have this but it doesn't do the animation it only falls down
    https://pastebin.com/qvWmrrxy
     
  2. A_Person_Named_Dart

    A_Person_Named_Dart

    Joined:
    Apr 14, 2018
    Posts:
    330
    You could probably wait a second until the animator is done until you destroy it. Use a coroutine and play the animation, then use yield return new waitforseconds to wait a few seconds before destroying it