Skip to content

NetworkAnimator (If there are more than 58 variables in the animator, an error)  #3095

@Royal2022

Description

@Royal2022

Description

If there are more than 58 variables in the animator, an error appears when connecting the second player. Also, if the variables are less than 58, then there are no errors.

Error: [Netcode] Player(Clone) threw an exception during synchronization serialization, this NetworkBehaviour is being skipped and will not be synchronized!

Reproduce Steps

  1. Create a project in Unity 6 preview.
  2. Install "Netcode for GameObjects 2.0.0" and "Multiplayer Play Mode 1.3.0" from the Package Manager.
  3. Create an object and attach the "Network Manager" component, select "Unity Transport" in the Network Transport.
  4. Create Player prefab and connect the following components to it: "Animator", "Network Object", "Network Transform", and "Network Animator", and then connect "Animator" to "Network Animator". Then in the "Animator" component create more than 59 variables.
  5. Attach the created prefab to the object with the "Network Manager" component and create a script for hosting and connection.
  6. Then host on the first one, and connect on the second one
  7. After connecting the client, an error will appear on the host side

Actual Outcome

On the client side, the host character does not display animation correctly.
And the host gets an error in the console

Expected Outcome

The animation is displayed correctly when connected, if the variables in the animator are less than or equal to 58, then everything is displayed correctly

Screenshots

Character animation when an error occurs:
Снимок экрана 2024-10-11 141439

Character animation when there is no error:
Снимок экрана 2024-10-11 141612

Screenshot of the error:
Снимок экрана 2024-10-11 141520

Environment

  • OS: Windows 11 Pro (Version: 23H2; Build: 22631.4169)
  • Unity Version: 6000.0.22f1
  • Netcode Version: Netcode for GameObjects 2.0.0; Multiplayer Play Mode 1.3.0

Additional Context

A project with an example of an error:
https://github.com/Royal2022/TEST-ERROR-PROJECT.git

Metadata

Metadata

Assignees

No one assigned

    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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions