Animation instant move to idle status

I just wonder if it is possible to instantly move to the idle state without any animation.

In my work scenario, the only animation parts are doors, windows, and trunk.

Let’s say I all the animated parts are opened.
Somehow I want to close all of them instantly without taking any time for the closing animation.

Is it possible?

Below is the my animation graph.

I’ve set time and exitTime of each transition of “On To Off” and “Off to Idle” to 0 in editor.

Then reloaded the launched scene and somehow the close action instantly happened.

However, if I changed those value from the dev console. it is not working as before.

Below is what I tried on the dev console.
tempEntity.anim.stateGraph.layers[0].transitions[3].time = 0;
tempEntity.anim.stateGraph.layers[0].transitions[3].exitTime = 0;

Is there anything I missed?

I figured it out by changing value of activeStateCurrentTime to 0

entityList[i].anim.baseLayer.activeStateCurrentTime = 0;
entityList[i].anim.baseLayer.activeState = "Idle";

However, all the related values are still unchanged.


This would be the way I would do it:

Press P to immediately go to the Punch state in the middle of the animation and pause the animation

Press R to reset back to Idle state.