I have 4 players which are identical except for the color of certain part of the sprite. In order to reduce the amount of work I made generic sprites and separate them in 2 layers, one with the parts which will not change and one with the parts which will change color. The problem is that I have issue with animating the players.
I added a child to my player prefab. It contains a sprite renderer and an animator controller. I use the same animator controller for the parent and for the child to just have to modify one time the structur if needed. When the players are instantiate, the color of the child’s sprite renderer is changed, so the color of the animation is changed. I have also a script which create AnimatorOverrideControllers to choose the the animations in the animator states (it allows to reduce the number of state).
This method achieve the purpose I want, but as there is 2 animator controllers, the animations are not well synchronized. So, is there a way to do what I want but with which animations are well synchronized ?