https://answers.unity.com/questions/362629/how-can-i-check-if-an-animation-is-being-played-or.html?page=1&pageSize=5&sort=votes
just send your animation name in CurrentAnimation you want to check.
public IEnumerator CheckAnimationCompleted(string CurrentAnim, Action Oncomplete)
{
while (!Animator.GetCurrentAnimatorStateInfo(0).IsName(CurrentAnim))
yield return null;
if (Oncomplete != null)
Oncomplete();
}
calling coroutine
StartCoroutine(CheckAnimationCompleted("Shoot", () =>
{
Animator.SetBool("Shoot", false);
// Your any code
}
));