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 animation event on kick trigger ?

Discussion in 'Animation' started by gardevoirea, May 13, 2017.

  1. gardevoirea

    gardevoirea

    Joined:
    May 12, 2017
    Posts:
    11
    Hi , i new on unity , and want ask how to give my character an animation event when he kick enemy , um here my script and animator :

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class miu : MonoBehaviour {

    public delegate void AnimationEvent();
    public static event AnimationEvent OnslashAnimationHit;


    void SlashAnimationHitEvent(){
    print ("event called");
    OnslashAnimationHit ();

    }
    }

    upload_2017-5-13_15-33-16.png

    i want give an explode when my character hit enemy ,

    upload_2017-5-13_15-34-6.png

    help me please :`)
     

    Attached Files: