Mechanim - How to switch the animation clip of a state at runtime?

Hi,

I have an idle state in my animator animation flow chart and I want to have more than one possible idle animation clip to play when the unit enters the idle state. Is there a way to change this via code in runtime?

I’ve gone through the animator API but can’t figure it out.

thanks,

I think the normal way of doing this would be to have a blendtree within the idle node, you can then alter the blend value via code to switch between them…

Cool … thanks. I’ll look into blenders and try to learn about them. I’m still really new to Mechanim.