Hi,
So This has been driving me crazy for the past couple of hours, I’ve figured out what the issue is, just not how to solve it.
I have a model with 3 animations. A default idle state, a power up state, and then a looping on state
so the model starts off, you press a button and it plays the power up anim, then when that finishes, it plays the on animation and loops it forever
if (GUI.Button (Rect (20,140,100,20), "Test Anim")) {
testasset.animation.CrossFade ("build");
testasset.animation.PlayQueued("working", QueueMode.CompleteOthers);
}
Now, I want to be able to control the speed of the looping aimation, should be a simple case of using something like animation[“working”].time=windspeed;
but no, looking at this topic http://forum.unity3d.com/viewtopic.php?t=28073 apparently because it creates it as a duplicate animation, you can’t simply do that, however you can set the speed when calling the playqueued.
So, is it then possible to change this speed on the go? ie can we call the duplicate animation state and set the speed on it from the update function? if not, is it possible to somehow call the looping aimation another way after the build animation plays?
Thanks
Well, as it says in the thread you mention, animation.PlayQueued returns a reference to the queued copy of the AnimationState that gets created. You can use the returned object to set the speed of the item in the queue.
yup,
I managed to do that no problem at all, but I want to be able to change that speed over time, not just once at the start of the animation. however I have no idea how I can make reference to that duplicated animation.
I actually hacked a way around it that while not perfect suits my current needs, but it involves basically just staggering the second animation without making use of the playqueued.
Playqueued would still be the prefered way to do it, but trawling the forums I’ve found lots of posts asking simmilar stuff, but no actual answer yet.
Are you saying that storing it in a variable and using it from there doesn’t work?
possibly… if i knew how to do that.
I do know that storing the speed in a variable and changing that doesn’t work, but then the playqueued is only being triggered once in the OnGUI.
I’m assuming calling the playqueued in the update would continually duplicate and queue the animation? I’m guessing this would be bad for performance.
Apologies for my ignorance, I’m pretty new to coding so it’s a steep learning curve 
If you use something like:-
var storedState: AnimationState; // Declared outside the function
// Then, in OnGUI...
if (GUI.Button (Rect (20,140,100,20), "Test Anim")) {
testasset.animation.CrossFade ("build");
storedState = testasset.animation.PlayQueued("working", QueueMode.CompleteOthers);
}
…you can then use storedState whenever you want afterward to set the animation’s speed or any other property.
aha!
That shoulda really been obvious to me I guess LOL, I will go try this out now 
Thanks