Skip to content

Network animator only syncing animations to clients if the are more than 2 clients connected #2134

@ChadGatling

Description

@ChadGatling

Description

On the network animator component. There is this check in the send animation functions:

if (NetworkManager.ConnectedClientsIds.Count - 2 > 0)

I believe this meant to be a comparison of greater than or equal.
As when there are only 2 connected clients this returns false and the animations are not sent to any client from the server. After a third client joins all the clients can see the animations of all the other clients.

This may be a result from testing based on hosted servers where there will only be one remote client and a host. Since the host is on the server he would be seeing the client's animations while sending his animations to the client. While the client would be seeing his own animations and sending his to the server(host). This check malfunctions when a dedicated server is used since the total number of clients will be less than 3 while also not having any player be on the server where the animations will always be expected.

Reproduce Steps

  1. Set your Network Animator component to owner authoritative
  2. Run a dedicated server
  3. connect 2 clients
  4. observe that neither client gets the other's animations
  5. connect a 3rd client
  6. observe that each client can now see there others' animations

Actual Outcome

Animations from clients are not synced when only 2 clients are connected to a dedicated server.

Expected Outcome

A client should be able to see the other client's animation on a dedicated server.

Environment

  • OS: Windows 10
  • Unity Version: 2021.10f1
  • Netcode Version: 1.0.0
  • Netcode Commit: d23f93d

Metadata

Metadata

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions