private void Start() { lastSyncMessage = AvatarSyncMessage.ToSyncMessage(avatarNPC); if (!NetworkCommander.IsServer && avatarNPC.animationVariator != null) { avatarNPC.StopCoroutine(avatarNPC.animationVariator); } }
public void DoSync() { syncMessage = AvatarSyncMessage.ToSyncMessage(avatarNPC); if (!syncMessage.IsEqual(lastSyncMessage)) { lastSyncMessage = syncMessage; NetworkCommander.CollectSyncMessage(lastSyncMessage); } }