void OnEnable() { DamageController.Initialize(); AnimatorClipInfo[] clipInfo = anim.GetCurrentAnimatorClipInfo(0); Destroy(gameObject, clipInfo[0].clip.length); dmgText = anim.GetComponent <Text>(); }