I am finally getting around to trying out the changes made in May with regards to allowing us to swap animation controllers for Mecanim. First, I wanted to be sure that what I was doing was expected as I didn't really see anything saying this is how it should work.
Basically, I have my base / out of combat state which has the defined animations for various activities as triggers, and then movement is just an auto parameter.
Then in combat if you're using a sword/shield, we switch to a different animator controller (currently an override controller) which does not have any of these triggers defined, but instead just the auto parameter and swapping the controller:
This does work, where calling attack properly calls the attack trigger and fires off the appropriate sword animation even though none of that is defined at this level and only in the previous animator. I tried this with both animator overrides and a new animator controller entirely and it worked in both instances. This is what my above question was about, is this how it should work? Just wanted to verify this wasn't an "unintended feature" that might be fixed before taking advantage of it :)
My second question sort of ties into the above too. I know that in general, mecanim does not report animation durations back. While loading from the controller for initial setup, it switched to animation clip with the proper names. Does Mecanim provide accurate durations from these clips, or must I switch all of these to fixed duration with their specific times? It seems like it does, but the animations are generally so short it's kind of hard to notice if it is or not.
Lastly, combining the two, if I use the override setup above, how does it determine the duration? Since the clip names, whether an override or new controller, are different, how is it determining the duration time (if at all), is it pulling from the base or if not found, no duration? Would I want to manually define each animation type again per controller to ensure it gets the right duration or does using an animator override cause mecanim to properly parse what Unarmed_Attack -> SwordAndShield_Attack does?
Like I said, it all seems to work just fine but I wanted to double check if my "seems" is actually a reality or not before going forward too deep on that and end up doubling on work.