How to setup infantry units

First of all, you need to setup specific fields in Unit data, it shown on screenshots below

../../_images/infantry-1.png

Is Infantry simple marks this unit as infantry.

../../_images/infantry-2.png

Animator Controller needed to allow animated character play its animations (our asset will setup it to Animator in prefab automatically).

Use Animations says to the code that this unit have animations like move, attack etc.

Now you need to make changes for infantry-specific needs in your unit prefab.

On automatic prefab generation it will do it, you know, automatically. :) But if something goes wrong or you want to do it manually, you need to add Infantry and AnimationsModule component to the unit prefab, and setup AnimationsModule field Animator - it will allow unit to play animations:

../../_images/infantry-3.png

This animator can be found in one of childs of prefab. If there no one in your model, add it manually:

../../_images/infantry-4.png

Setting up the animated character model is the same to the default Unity pipeline. After these things are done, it should work fine and play animations, if you added it in your Animation Controller. For more info you can check our asset example infantry soldier prefab, animator, etc.