Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Owner-Authoritative Network Animator not syncing properly between clients

Discussion in 'Netcode for GameObjects' started by robinhood14501, Aug 10, 2023.

  1. robinhood14501


    Jul 22, 2021
    Using this script for an Owner-Authoritative network animator:

    Code (CSharp):
    1. using Unity.Netcode.Components;
    2. using UnityEngine;
    4. [RequireComponent(typeof(Animator))]
    5. public class OwnerNetworkAnimator : NetworkAnimator
    6. {
    7.     protected override bool OnIsServerAuthoritative()
    8.     {
    9.         return false;
    10.     }
    11. }

    This script is attached to each player, and performs as expected on the host's side, but doesn't sync animations client-to-client.

    Host side: All players are animated as expected
    Client side: The host's player is animated correctly, but the other client's players are not.

    From this it looks like the server is receiving the state changes, but just isn't communicating them properly to the other clients:

    New Project (10).png

    Does anybody have any insight as to why this might be happening?
  2. simon0063


    Sep 3, 2020
    are you reslove this, i meet the same bug