How to organize AddMixingTransform


I’m optimizing the animation system in my game, and I have it working the way I want (I can add/drop animations without it affecting the main flow of the game). It’s a premature organization, but I want to do something about it now before it gets out of control.

The animation issue that I keep coming across and can’t seem to figure out a solution to is how I would manage AddMixingTransform for multiple characters. My current system seems very very rugged ( case switch to see what character it is, then to see what animation it is)

I could easily use the same method for many animations across similar humanoid characters with X amount of bones, but it’s the non-humanoid characters with Y and Z amount of bones that I’m worried about.

Can anyone point me in the right direction / at least what they found was useful?

Why are you trying to build your own system to handle this, mechanim was built for this, you can just build off of that if you need more. Here is a tutorial on using mechanim. Mechanim allows you to use the same animations across multiple characters of any pretty much any variation. It also allows merging / mixing of animations, control of transitions and other cool stuff.