Skip to content

Feedback for ocs/components/networkanimator.md #914

Closed
@DustinRobison

Description

@DustinRobison

I see a constant warning in developer mode logging:

[Netcode] Detected the Host is sending itself animation updates! Please report this issue.
UnityEngine.Debug:LogWarning (object)
Unity.Netcode.NetworkLog:LogWarning (string) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Logging/NetworkLog.cs:28)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:1210)
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/com.unity.netcode.gameobjects@1.1.0/Runtime/Messaging/Messages/RpcMessages.cs:77)
Unity.Netcode.ClientRpcMessage:Handle (Unity.Netcode.NetworkContext&) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Messaging/Messages/RpcMessages.cs:154)
Unity.Netcode.NetworkBehaviour:__endSendClientRpc (Unity.Netcode.FastBufferWriter&,uint,Unity.Netcode.ClientRpcParams,Unity.Netcode.RpcDelivery) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkBehaviour.cs:230)
Unity.Netcode.Components.NetworkAnimator:SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator/AnimationMessage,Unity.Netcode.ClientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:1204)
Unity.Netcode.Components.NetworkAnimator:CheckForAnimatorChanges () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:820)
Unity.Netcode.Components.NetworkAnimatorStateChangeHandler:NetworkUpdate (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Components/NetworkAnimator.cs:76)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage) (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkUpdateLoop.cs:185)
Unity.Netcode.NetworkUpdateLoop/NetworkPreUpdate/<>c:<CreateLoopSystem>b__0_0 () (at Library/PackageCache/com.unity.netcode.gameobjects@1.1.0/Runtime/Core/NetworkUpdateLoop.cs:232)

My Code:

 public class PlayerNetwork : NetworkBehaviour
 ..
 Animator anim;
 OwnerNetworkAnimator networkAnimator;
 ..
 public override void OnNetworkSpawn()
 {
     ...
     anim = GetComponent<Animator>();
     networkAnimator = GetComponent<OwnerNetworkAnimator>();
     networkAnimator.enabled = !IsHost; // attempted solution, no luck
     ...
 }
 void FixedUpdate()
 {
     ...
     anim.SetFloat("Speed", direction.sqrMagnitude);
     // networkAnimator.Animator.SetFloat("Speed", direction.sqrMagnitude); <-- also tried this no luck
     ...
  }

I followed the docs, should I be concerned?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions