Search Unity

How to disable a Gameobject after playing an animation?

Discussion in 'Animation' started by rahulk1991, Dec 16, 2019.

?

Animator or Animation?

  1. Animation

    9 vote(s)
    52.9%
  2. Animator

    7 vote(s)
    41.2%
  3. UE4?

    1 vote(s)
    5.9%
  1. rahulk1991

    rahulk1991

    Joined:
    Feb 22, 2019
    Posts:
    12
    Hey there,

    I have a game object with an animation, which I want to play just before disabling the game object. I am using SetActive(false) for the disabling of the object, and I re-enable the object later too.
    animation.play("animation_name") is not working for me. Couldn't find any posts related to this via google search either, can someone point me in the right direction? I am on 2019.1.8f..
    Thanks.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570