0
\$\begingroup\$

So atm im working on a game where we need many different units each with their own animation set. Is there a way to automate this process? or do we have to create blend trees manually with each animation set. Or can you populate blend trees programatically by using resources folder and doing a prefix keeping the animations with a uniform name. Maybe im overthinking this lol.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Would all those automatically generated animator controllers use the same logic but with different animations? Then I would recommend to create only one animator controller and create an Animator Override Controller for each unit. \$\endgroup\$
    – Philipp
    Dec 27, 2022 at 10:24
  • \$\begingroup\$ Hello and thanks for replying! Yep they would use the same logic, movement, attacks etc. For now we're just creating multiple animation controllers with different animations. But yes an Animator override controller definitely seems like what i could use for it. \$\endgroup\$
    – Angelo
    Jan 6, 2023 at 11:38

2 Answers 2

1
\$\begingroup\$

Using Animator Override Controller, you can easily swap animations without the need of creating a new animators.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This answer would be even better if it showed an example of how to do this. \$\endgroup\$
    – DMGregory
    Dec 27, 2022 at 19:14
  • 1
    \$\begingroup\$ For now we're just doing different Animator controllers, but an override controller might work as well! thanks! \$\endgroup\$
    – Angelo
    Jan 6, 2023 at 11:39
1
\$\begingroup\$

According to the comments, all those automatically generated animator controllers would use the same logic but with different animations.

In that case it's a good idea to just use a single animator controller and instead create an Animator Override Controller for each unit.

Animator override controllers are assets which reference an existing animator controller, and replace the actions of individual states with different ones. You can then go to the animator of your unit and assign that override controller to the Animator just like you would assign a real animator controller.

The animator will then use the logic of the animator controller referenced by the override controller, but use the actions defined in the override controller.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .