Exit Mecanim State After Exit Time Or With Interruption And Exit Time

I have a simple test animator controller for variable jumps in a 2d platformer using root motion. My problem is that I have a jump state which will exit to a Jump Cap state that kills the player’s upward velocity and then returns to idle (I’ll be replacing the Jump Cap state with a StateMachineBehaviour script attached to the Jump state).

The Jump state should exit either when it plays all the way through (exit time of 1) or when it gets a Jump Cancel trigger. The Jump Cancel should exit the state early, but still have an exit time of 0.5 or whatever value so I can set a minimum jump.

I have 2 transitions exiting the Jump state:

The issue I’m running in to is that what actually happens is that I can tap the jump key and do a minimum jump if I release the jump key and send the Jump Cancel trigger before the exit time for the Jump Cancel transition. I end up with either a minimum jump or a maximum jump, but not anything in between.

Basically, the Jump Cancel transition only works if it receives the trigger before the exit time. If it gets the trigger after the exit time it doesn’t do anything, and this isn’t what I need.

If I disable the exit time for the Jump Cancel transition it allows me to do a variable jump how I want, but it doesn’t allow me to jump at least a minimum amount before exiting.

Seem to have found a solution from this thread:
http://forum.unity3d.com/threads/mecanim-exit-time-transition-with-additional-condition.243856/

I created a script called SetNormalizedTime:

public class SetNormalizedTime : StateMachineBehaviour 
{
	[SerializeField] private string targetParameter = "Normalized Time";

	public override void OnStateUpdate (Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
	{
		animator.SetFloat(targetParameter, stateInfo.normalizedTime);
	}
}

This script is attached to my Jump state and feeds the state’s normalizedTime back into the Animator. Then I turn off Exit Time for my Jump Cancel transition and add NormalizedTime as a float parameter. I can then exit when the normalized time is greater than a percentage of the animation.