- Home /
Animation plays without a bool, but after adding it just goes still
So, I can get the Animation to play if I have
function Update(){if(!obj.animation.IsPlaying(animationClip[0].name)){
obj.animation.CrossFade(animationClip[0].name);
}}
but
function Update(){if(isPlaying && !obj.animation.IsPlaying(animationClip[0].name)){
obj.animation.CrossFade(animationClip[0].name);
}}
to enable Playing I have a play button and I can see this in the inspector as being true, but the model just goes still and using this print
print(obj.animation.IsPlaying(animationClip[0].name) + " " + obj.animation.clip.name + " "+ obj.animation[animationClip[0].name].time);
Which says True, my Animation name, and the time is always 0;
Any ideas? It's probably obvious, but I cant see the cause. I also have a stop that changes isPlaying to false and it will CrossFade to the original animation. I have also tried Play instead of Crossfade still no luck.
Comment
Your answer
Follow this Question
Related Questions
Animation Stop and Stay 1 Answer
how to make my component disabled after an animation 1 Answer
How to use CrossFade with anim2 when anim1 is over? 1 Answer
Animation Finished 1 Answer
play an animation after 15 seconds 1 Answer