Animations using Netcode for GameObjects

I rifled through the limited resources for NGO and found nothing helpful for animations in a 3D project. I equipped my project with ParrelSync for testing and managed to get the player transforms to work. On a single client I can see the player model running around with correct animations, but when I check the other client I do not see any animations. Adding a NetworkAnimator to the GameObject that has the Animator attached to it did not help.

Sorry that it’s the crappiest gif ever… You can see at the end of the gif the player is moving away from the camera and they are not doing the running animation. Their legs are just wiggling back and forth… The lighting sucks because I’m making a dark game and need the scene dark to test lighting.

This is how my hierarchy and inspector look. The GameObject that has the Animator component is a child, and its parent is the one whose Transform is actually being translated in space. I suspect this might have something to do with it, but I’m not sure.

The root object, “Player Prefab” has a ClientNetworkTransform and a NetworkObject component attached to it:

Please let me know if you have any ideas on how to solve this problem, or if you know of any helpful tutorials that specifically cover animation for NGO.

I think I got this mostly resolved… I removed the Client Network Transform component from the root object and replaced it with a Network Transform component. Then I restructured my scripts that move the root object so that the movement works over the network. I added a Network Animator component to the GameObject which has the Animator attached to it and replaced all instances of

...
character.animator.SetTrigger("Stuff");
...

to

...
if (character.networkAnimator != null) character.networkAnimator.SetTrigger("Stuff");
else character.animator.SetTrigger("Stuff");
...

where character.networkAnimator is just a reference to the Network Animator component. I did identical changes to lines which say ResetTrigger instead of SetTrigger.

I hope this helps whoever may stumble onto it. Some resources that really helped me a lot were:

Actually, the real solution I think was to use the Owner-authoritative version of NetworkAnimator, which is the same as “client-authoritative” behavior:

    public class OwnerNetworkAnimator : NetworkAnimator
    {
        protected override bool OnIsServerAuthoritative()
        {
            return false;
        }
    }