Skip to content

Network Animator error on Client: [DestinationState To Transition Info] Layer (0) does not exist! #2828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
marcobethkeskyered opened this issue Feb 15, 2024 · 12 comments · Fixed by #2999 or #3008
Assignees
Labels
priority:high This issue has high priority and we are focusing to resolve it stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report

Comments

@marcobethkeskyered
Copy link

Description

(Animations are working and everything but the exception is logged anytime I switch to another animation)

[Netcode] [DestinationState To Transition Info] Layer (0) does not exist!
UnityEngine.Debug:LogError (object)
Unity.Netcode.NetworkLog:LogError (string) (at ./Library/PackageCache/[email protected]/Runtime/Logging/NetworkLog.cs:34)
Unity.Netcode.Components.NetworkAnimator:UpdateAnimationState (Unity.Netcode.Components.NetworkAnimator/AnimationState) (at ./Library/PackageCache/[email protected]/Components/NetworkAnimator.cs:1180)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at ./Library/PackageCache/[email protected]/Components/NetworkAnimator.cs:1292)
Unity.Netcode.Components.NetworkAnimator:__rpc_handler_1069363937 (Unity.Netcode.NetworkBehaviour,Unity.Netcode.FastBufferReader,Unity.Netcode.__RpcParams)
Unity.Netcode.RpcMessageHelpers:Handle (Unity.Netcode.NetworkContext&,Unity.Netcode.RpcMetadata&,Unity.Netcode.FastBufferReader&,Unity.Netcode.__RpcParams&) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/Messages/RpcMessages.cs:70)
Unity.Netcode.ClientRpcMessage:Handle (Unity.Netcode.NetworkContext&) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/Messages/RpcMessages.cs:159)
Unity.Netcode.NetworkMessageManager:ReceiveMessage<Unity.Netcode.ClientRpcMessage> (Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&,Unity.Netcode.NetworkMessageManager) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:582)
Unity.Netcode.NetworkMessageManager:HandleMessage (Unity.Netcode.NetworkMessageHeader&,Unity.Netcode.FastBufferReader,ulong,single,int) (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:446)
Unity.Netcode.NetworkMessageManager:ProcessIncomingMessageQueue () (at ./Library/PackageCache/[email protected]/Runtime/Messaging/NetworkMessageManager.cs:472)
Unity.Netcode.NetworkManager:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkManager.cs:48)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkUpdateLoop.cs:185)
Unity.Netcode.NetworkUpdateLoop/NetworkEarlyUpdate/<>c:b__0_0 () (at ./Library/PackageCache/[email protected]/Runtime/Core/NetworkUpdateLoop.cs:208)

Reproduce Steps

I think its not so hard to reproduce. There are many people having the same issue.
Links of others:

  1. https://discussions.unity.com/t/netcode-destinationstate-to-transition-info-layer-0-does-not-exist/264321/3
  2. https://stackoverflow.com/questions/76636441/weird-error-when-client-connecting-to-host-netcode

Actual Outcome

Whenever I do an attack, the animation error is logged.

Expected Outcome

It would be nice to understad why the errors are logged.

Environment

  • OS: [Windows]
  • Unity Version: [2022.3.8f1]
  • Netcode Version: [1.8.0]
  • Netcode Commit: [e.g. https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/commit/ba418fa5b600ad9eb61fab0575f12fbecc2c6520]

Additional Context

I have a blend tree for locomotion, but for the attacks I am just switching to an animation state.

@marcobethkeskyered marcobethkeskyered added stat:awaiting-triage Status - Awaiting triage from the Netcode team. type:bug Bug Report labels Feb 15, 2024
@morettyCat
Copy link

We are facing the same problem. It's been debugging the info because you probably use a blend tree on your animation, and i don't know why but it's trying to access to a state(0) on that blend tree when an animation end and go from inside the blend tree to outside of it.

It's like you can't use blend tree on animators or you'll have tons of warnings around, which is not so nice :\

@fluong6 fluong6 added priority:high This issue has high priority and we are focusing to resolve it stat:import Status - Issue is going to be saved internally stat:imported Status - Issue is tracked internally at Unity and removed stat:awaiting-triage Status - Awaiting triage from the Netcode team. stat:import Status - Issue is going to be saved internally labels Feb 26, 2024
@colbydane
Copy link

Using ver 1.8.1 issue still exists.

  • only shown when log level is developer.
  • only on the a non owner of the network animated object
  • my Animator Controller entry state is a blendtree w/ 2 floats used
  • I am using clientNetworkAnimator. server Authority is false

@marcobethkeskyered
Copy link
Author

Update:

I am also using Blendtree + ServerAuth = true

@NoelStephensUnity
Copy link
Collaborator

This could be an issue with (maybe?) a transition back to no state on Layer 0 and the original design was expecting some form of registered transition.

@marcobethkeskyered @colbydane

Before I go and just remove that error message (i.e. it might be a perfectly valid combination and no reason to log any message), the animations are playing/synchronizing correctly and the issue is just the spam of the message?

@ducksplash
Copy link

This could be an issue with (maybe?) a transition back to no state on Layer 0 and the original design was expecting some form of registered transition.

@marcobethkeskyered @colbydane

Before I go and just remove that error message (i.e. it might be a perfectly valid combination and no reason to log any message), the animations are playing/synchronizing correctly and the issue is just the spam of the message?

In my particular case, the animation plays but is not visible to other parties, only the local player.

@colbydane
Copy link

For me everything acts as expected, except for the error log.

@NoelStephensUnity
Copy link
Collaborator

Generally speaking, that error message is logging because there was some form of transition to Layer 0 with no destination state (or there are no defined Animator transitions from say like Layer 2 to Layer 0 so that table can be built during editor to runtime/entering play mode build/serialization).

@ducksplash
Is there any way you could provide a simplified version of your project that includes the assets needed (i.e. the model and Animator) along with the scripts (or a reduced set of the scripts) used to update the Animator (i.e. transition between states etc)?

@colbydane
Ok, pending what I find from @ducksplash I might just remove that warning... but don't want to do that just yet until I determine if this error might still be useful. If you possible, providing me with the same kind of assets I am asking ducksplash to provide would help me figure out the differences to better determine what conditions should be met to log that error.

@LeaveMyYard
Copy link

I also have found this issue.

While at first it looked like everything is working as expected, I noticed that animation at moments I get this error is not perfect (like it skips a transition for character legs and it appears overall jittery).
While on host everything looks smooth, on clients it is not.

So, @NoelStephensUnity, I assume just removing an error is not the solution?

I can also try to make a small example with this error being reproduced, if that will help. But that will take some time

@NoelStephensUnity
Copy link
Collaborator

@LeaveMyYard
If you could do that it would be greatly appreciated and would help me track down and fix this issue,.

@NoelStephensUnity
Copy link
Collaborator

Fixed the issue in #2999. If anyone wants to test that branch for NGO v1.x projects then you can update your manifest file with this:
"com.unity.netcode.gameobjects": "https://github.com/Unity-Technologies/com.unity.netcode.gameobjects.git?path=com.unity.netcode.gameobjects#fix/dual-triggers-generating-false-state-transition"

@minimastudios
Copy link

Also Getting this issue. unity 6.26f1, ngo 2.1

@KreutzerCode
Copy link

I’m experiencing the same issue. I tested this with a fresh Unity project (6000.0.22f1) using NGO 2.1.1.

Steps to reproduce:

  1. Set up a new Unity project.
  2. Import the ThirdPersonController StarterAsset from Unity
  3. Add a ClientNetworkAnimator component based on Unity's client-authoritative examples from NGO documentation (link below): https://docs-multiplayer.unity3d.com/netcode/current/components/networktransform/#owner-authoritative-mode

The issue occurs when the host jumps and exits the animator's blend tree. On the client, the following error is thrown:

[Netcode] [DestinationState To Transition Info] Layer (0) does not exist!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high This issue has high priority and we are focusing to resolve it stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report
Projects
None yet
9 participants