Idea: Dynamically Generated Animation Controller?

justingirard

New member
I'm about to embark on a journey to heavily customize the controller. This means swapping out animations, and transitions, many times. I have been trying to figure out how to modularize the process and make it something I can version control. Then I noticed in the Climbing and Ability packs -- they do something cool: They layer on new animations into an existing controller.

Are there any general resources / best practices here? What I am thinking is this -- having a build script I can run that generates a final controller?

Such a script would bake layers when invoked:
-----
1 - Base Controller (V.x.x) (Movement, base layers)
2 - Special weapon controller (V.x.x)
3 - Agility / Climbing controller
etc etc
= Final Controller

This could give me the ability (when debugging) to do things like isolate (or build) the base_controller + weapon_controller. It also means when upgrading, or experimenting, I could first bake something on top of a base_controller first to test things out, without diving into a massive state machine.

Anyway -- Thoughts on this kind of thing?
 
For the add-on packs I save the animator controller values that were created manually in a script so it can then be applied automatically on your own character. For a high level of how the animator scripts get created by the controller take a look at AnimatorBuilder.GenerateAnimatorCode. For your situation it sounds like you want to take this to the next level and GenerateAnimatorCode may be a good base to get you going.
 
Top