Im doing a boss FSM and I have a simple position animation in my animator. It plays the animation on a random interval but it doesn’t continue if I have wait till finish selected. The animation is not set to loop.
The problem lies within the Mecanim system. If you try to play an animation state that is already the current playing animation state, then the animation won’t play again from the beggining.
If you change between animation states, then everything will be fine.
For example, if the animation you want to play is an “Attack” animation (non-looping) and you tell animator to play “Attack” again, it won’t happen. If though after the attack, you play an “Idle” and then “Attack” again it will play.
It’s just how the Mecanim/Animator works. It doesn’t really have to do whether or not the animation is set to Loop or WaitUntilFinish within the NC action task.
Thanks for the quick reply. I tried using legacy but I got null reference exceptions and nothing would play. I’m not sure what I need to do differently.
I’ve tested NC in Unity version 4.6. Where do you get a null reference exception?
Can you email me a project info@nodecanvas.com so that I can take a look?
So I can’t actually say that it’s a 4.6 problem any more but what I did was created animation for a blank sphere using the Unity animation editor. In the import options there is no option to set it for legacy. I assume that you can only use imported animations for the legacy animation system.
If you want to use Mecanim (Animator), you should use the PlayAnimation action (and other actions) found under the “Mecanim” category, or else if you want to use Legacy animation, the ones found under the “Animation (Legacy)” category.
The Legacy actions take an AnimationClip as paramter, while the Mecanim actions take a string which is the state you want to play.
Yes but the Legacy actions take an AnimationClip imported as Legacy as opposed to the other options of humanoid or generic. What I have found is that this animation type selection is only available on imported animations not on unity created animations.
The workaround to create Legacy animations within Unity is to FIRST add the Animation component (not Animator) and then from within the Animation Editor Window, create and edit your new Clip.
🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.