Switching between gun positions

In unity, i have my MP7 model, and i have an animation which can bring the stock out, and put the stock back in, what i am wondering is, how would i press a button to play “StockOut” animation, and keep the stock out instead of it going back to the idle animation which has the stock back in. If this is a bit confusing, ill try to explain it better. It’s just changing the position of the stock VIA animation. I dont want a script, but i just want to know how to do it, im thinking of using a bool, but thats as far as my scripting knowlege goes.



Try to create another animation which is f.ex: IdleStockOut, change your script from going to your “Idle” animation to “IdleStockOut”.
Im really bad in animations but i think this logic should work.

If you want a button press to do something you need some scripts, but its really simple.

                animation.PlayQueued("IdleStockOut", QueueMode.CompleteOthers);

Make sure the idles are loopes, which you probably are already aware of.

Also, as for the scripts mentioned earlier, i guess you could just use Mechanim to minimize the script usage to your preferences. I have little knowledge on mechanim so i guess you should experiment a bit.