Closed
Description
Describe the bug
I have an animator on my Player prefab that I would like to sync over the network. As a result I've added a NetworkAnimator component to my Player and I've dragged & dropped my Animator in the correct slot.
Even when I don't sync anything (I don't select any of my Animator parameters), the game crashes when I run it due to following error:
OverflowException: Reading past the end of the buffer
Unity.Netcode.Components.NetworkAnimator.ReadParameters (Unity.Netcode.FastBufferReader reader, System.Boolean autoSend) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Components/NetworkAnimator.cs:396)
Unity.Netcode.Components.NetworkAnimator.SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator+AnimationMessage animSnapshot, Unity.Netcode.ClientRpcParams clientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Components/NetworkAnimator.cs:427)
Unity.Netcode.Components.NetworkAnimator.SendAnimStateClientRpc__nhandler (Unity.Netcode.NetworkBehaviour target, Unity.Netcode.FastBufferReader reader, Unity.Netcode.__RpcParams rpcParams) (at <c9cf9d45b44c4ede894402c60534568f>:0)
Unity.Netcode.RpcMessage.Handle (Unity.Netcode.FastBufferReader reader, Unity.Netcode.NetworkContext& context, Unity.Netcode.NetworkManager networkManager, System.UInt64 senderId, System.Boolean canDefer) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Messaging/Messages/RpcMessage.cs:93)
Unity.Netcode.NetworkBehaviour.__sendClientRpc (Unity.Netcode.FastBufferWriter writer, System.UInt32 rpcMethodId, Unity.Netcode.ClientRpcParams rpcParams, Unity.Netcode.RpcDelivery delivery) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Runtime/Core/NetworkBehaviour.cs:193)
Unity.Netcode.Components.NetworkAnimator.SendAnimStateClientRpc (Unity.Netcode.Components.NetworkAnimator+AnimationMessage animSnapshot, Unity.Netcode.ClientRpcParams clientRpcParams) (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Components/NetworkAnimator.cs:415)
Unity.Netcode.Components.NetworkAnimator.FixedUpdate () (at Library/PackageCache/com.unity.netcode.gameobjects@1.0.0-pre.2/Components/NetworkAnimator.cs:228)
Environment (please complete the following information):
- OS: Windows 10
- Unity Version: 2020.3.21f1
- Netcode Version: 1.0.0-pre.2
Anyone know what's going on here? Am I doing something wrong?
This used to work without any issue with MLAPI.