Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Destroy Game Object after animation end
using UnityEngine;
public class ExplosionCenter : MonoBehaviour
{
// Use this for initialization
void Start()
{
Destroy(gameObject, this.GetComponent<Animator>().GetCurrentAnimatorStateInfo(0).length);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.