Hello guys. I want to change the animation from a Button UI. When I do that I get an error "Animator is not playing an AnimatorController ". I have done the same thing manually, and also from the unity method. But same result.
public void CustomTrigger(string triggerName) {
Animator anim = this.GetComponent<Animator>();
if (anim.gameObject.activeSelf)
{
anim.SetTrigger(triggerName);
}
}