- Home /
Swap animations
Hi, is it possible to swap animations in unity either with a script or playmaker?
For example, I'd like to temporarily replace Element 0: 'walk' with another different animation also named 'walk'
I use a FS$$anonymous$$ to manage my animations. For example I have this public AnimationClip walkAnimation;
(drag/drop clip) and then later do this
if (playerstate == PlayerState.Walk) {
_animation [walkAnimation.name].speed = 2.0f;
_animation.CrossFade (walkAnimation.name);
}
If you have something similar, you could setup walkAnimation1, walkAnimation2, walkAnimation3, etc and change your playerState to Walk, Walk1, Walk2, etc. The short answer is yes, it's definitely possible
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Play animation once 1 Answer
Play animation for horizontal and vertical movement? 1 Answer
Mixamo Call Animation from Script 0 Answers
Adding animation clips via script 2 Answers