Skip to content

NetworkAnimator bug in Netcode 1.1 #2293

Closed
@Chien-65

Description

@Chien-65

Description

I got a null exception in NetworkAnimator.BuildTransitionStateInfoList. Because I only have transition.destinationStateMachine for some transitions, no transition.destinationState. This happen when I upgrade from Netcode 1.0 to Netcode 1.1. This also cause syncing issue from animation state to animation state machine.

Reproduce Steps

  1. Create an animator for a character.
  2. Create an idle animation state and attack animation state machine. Then create an animation transition connect idle and attack with attack trigger parameter.
  3. Inside attack animation state machine, you can create two animation states like sword attack and axe attack.
  4. Create an animation transition connect entry node to sword attack state with weapon type int parameter(value 0).
  5. Create an animation transition connect entry node to axe attack state with weapon type int parameter(value 1).
  6. When you play the game, then you will see a null exception for transition.destinationState in NetworkAnimator.BuildTransitionStateInfoList function.

Actual Outcome

An null exception, also the animation will no sync correctly.

Expected Outcome

No null exception and the animation sync correctly between client and server.

Screenshots

image

Environment

  • OS: Windows
  • Unity Version: 2021.3.9f1
  • Netcode Version: 1.1m here. Logs, code snippets would be useful here but please also consider attaching a minimal Unity project that reproduces the issue.

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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions