My player object is made of multiple meshes animated. It has one root object and multiple child objects with animators on some of them. I don’t want to give a new network identity to every animated child, but only one NetworkAnimator component may be placed on the root object and it requires the root object to have Animator component on it. How to work around this? Or may be there’s something like NetworkAnimatorChild component?
For now I’m trying to decompile and rewrite NetworkAnimator, but there should be better way i think.
Why do you have animators on child objects? I’m not understanding why your player is made of multiple meshes. Usually a player is a single mesh once it’s imported into Unity.
I might be doing this completely wrong, but I have an animator for my player object, and then an animator for my gun object (which is a child of player). Is that bad?
That’s the hardest way to implement complex objects with multiple animations not related directly to each other. However, if all your guns have same animations states (like fire, reload, etc) and bones (if any), then you can use animator controller layers for that and stick to one animator having a separate layer for a gun. In my case, however, subobjects have different bones and logics. I have not only guns and my subobjects are in many numbers, 3 to 10 approximately. The controller grows quickly and becomes an unmanageable mess, so I decided to try to break layers into separate controllers for different subobjects. That’s much more clean solution, but it looks like I need to go through the network animator source code implementing my own network animator child class in order to accomplish that.