KybernetikGames / animancer

Documentation for the Animancer Unity Plugin.
63 stars 8 forks source link

Question for Inspector Warnings #323

Closed wrymn closed 8 months ago

wrymn commented 8 months ago

I want to ask regarding the following inspector warnings. image

Basically, all our units have no IDLE animation. They either play walk animation, or don't play anything at all. However this causes warning to be displayed in Animancer Component that weights does not equal 1. But from out point of view, this is correct, as when unit is not moving or attacking, we blend those animations to 0 weight so they don't play.

Is this a correct approach? Can this warning decrease performance or cause some issues?

Regarding the second warning "There are no Override layers at weight 1". Why is this again an issue? As states previously, we do not want anything to animate when unit is idle. The second layer we see is additive, so it can always play additively when unit is walking.

Again the same question, is this approach correct? Can it really cause issues? :)

Thank you 👍

KybernetikGames commented 8 months ago

Those warnings are just hints that if something isn't working properly, this might be why. So if it's behaving how you want it then there's no problem. That's why they're only warnings.

The first warning is simply because most games will have idle animations and pretty much never want a character to be frozen without any animation at all.

The second is similar. You have Layer 1 set to Additive but nothing is playing on the Base Layer for it to add to so it wouldn't usually give a desirable result.

Performance-wise, you are wasting a bit because the Walk animation is actually still playing (time bar is green) and it's not quite at 0 weight (~0 means its less than 0.1 but not fully 0). So you would get a bit better performance by calling state.Stop(); to fully stop it. Or if you just want to freeze at its current time, state.IsPlaying = false;.

wrymn commented 8 months ago

Thank you very much, that explains it :)