Cross Fade from Looping -> OneShot -> Looping animation

I need to be able to transition (or CrossFade in Unity parlance) from a looped animation into a oneshot animation into another looped animation.

So for example:

1) Walking - Looped 2) Change stance from Walking to Lying - One Shot 3) Crawling - Looped

I can transition from the first looped animation into the oneshot animation, and it works fine, but I can't find a way to successfully CrossFade into the third animation. I seem to have to use (the undocumented) PlayMode.Clamp on my OneShot animation, to prevent it from going back to the beginning when it finishes. However, when I cross fade from the end of that (clamped) oneshot animation, it just jumps into the animation instead of CrossFading.

So I'm not sure if it the clamp'ed animation is unable to crossfade because I clamped it, or if the clamp'ed animation is reverting to looped when I set the wrapMode to WrapMode.loop for the animation I'm cross fading into. Ideally, I would have set the wrapmode for each animation, but the wrapmode is not set when you play or crossfade an animation.

You can set the wrapmode individually for each animation.

You can set the wrapmode of the animation states, or of the animation clips themselves in the import setting (starting from Unity 2.6). See the releated answer here.

In order for the one-shot animation to still have effect after it has finished playing (which is required for the cross-fade to work correctly) you can set the wrapmode to ClampForever.