Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to make an event fired when a clip of animation played over

Discussion in 'Animation' started by Lulucifer, Sep 2, 2014.

  1. Lulucifer

    Lulucifer

    Joined:
    Jul 8, 2012
    Posts:
    358
    How to make an event fired when a clip of animation played over
    I mean,when the clip is playing,it could break into another clip at anypoint,
    I want to fire an event when the clip has been finished playing,
    (in the event, i want do do something,eg.adjust layer weight)
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    You can use animation event, simply create an animation event at the end of your clip which will call a function of your choice which should adjust the layer weight.
     
    OllyNicholson likes this.
  3. Lulucifer

    Lulucifer

    Joined:
    Jul 8, 2012
    Posts:
    358
    Thanks ,U guy,But whe clip may not play over,it could be break out at some points before the end frame
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
  5. Lulucifer

    Lulucifer

    Joined:
    Jul 8, 2012
    Posts:
    358
    Ok, that is it, thanks