How to repeat an animation before it finishes playing,Allowing an animation to interrupt itself

I have a gameobject with a pulse and idle animation. Currently, I have it so when I press a certain button, a trigger is activated and the object goes from idle to pulse and back to idle once the pulse finishes playing. However, I want to make it so the pulse animation can be repeatedly spammed without waiting for it to finish, meaning if the pulse animation is currently playing, I want to be able to press the same button to restart the pulse animation without waiting for it to finish playing. Any tips on how to do this?,I have a gameobject that has a pulse animation and an idle animation. Currently, I have it so when a certain button is pressed, a trigger will be activated and make the object transition from idle to pulse. The pulse finishes playing and goes back to the idle animation. However, I want to make it so I can repeat the pulse animation if I press the same button during the pulse animation without the first repetition finishing. Any tips on how to do this?

Transitions in controller state machine have a ‘transit to self’ option. You can create a transition from the animation to itself, or create a transition from ‘any state’ node to your animation.