Can you swap out animation controllers at runtime?

DavidC

Active member
I was wondering if there was a better way to "organize" the animation controller. I am going to have several different sets of animations depending on what weapons are carried. Considering how complicated the controller already is, I'm wondering if this is possible and makes sense to do?
 
You might want to look at animator overrides: https://docs.unity3d.com/Manual/AnimatorOverrideController.html

I'm not exactly sure how well-suited the demo animator is for overrides, there was a topic about this recently: https://opsive.com/forum/index.php?...e-controller-interrupt-current-movement.6342/

To be honest, in the case of having different animations for a single character/object based on items, the expected thing would be to still use a single animator controller with more substates. But I know that animator controllers can get quite complex and hard to manage. Unfortunately I think this is partially just a limitation of Unity's animator setup - perhaps there are other third-party assets/tools out there that might help with this.
 
You might want to look at animator overrides: https://docs.unity3d.com/Manual/AnimatorOverrideController.html

I'm not exactly sure how well-suited the demo animator is for overrides, there was a topic about this recently: https://opsive.com/forum/index.php?...e-controller-interrupt-current-movement.6342/

To be honest, in the case of having different animations for a single character/object based on items, the expected thing would be to still use a single animator controller with more substates. But I know that animator controllers can get quite complex and hard to manage. Unfortunately I think this is partially just a limitation of Unity's animator setup - perhaps there are other third-party assets/tools out there that might help with this.
Oh, perfect. This is exactly the type of thing I need.

Any reason the demo controller might not be well suited? I'm not familiar enough with controllers to know what practices are good/bad, or what ways you can do them. I've watched a few tutorials and they all seem to be about the same as how the demo controller is setup.
 
Unfortunately I have no experience with overrides so I can't say for sure, I just didn't want to promise they'd work with the demo animator out-of-the-box..!
 
Top