NetworkAnimator component not functioning since 5.2 upgrade!
Hey everyone. So since I upgraded from 5.1.1 to 5.2.0 I All my network animator components appear to have stopped working!
Here's a forums post I made right before 5.2 exited beta (http://forum.unity3d.com/threads/cant-seem-to-get-networkanimator-running-since-5-2-upgrade.353250/#post-2289118). Has anyone else run into this issue? Below is the output that I get from the client when I have a network animator attached to a gameobject.
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.Networking.NetworkSystem.AnimationParametersMessage.Serialize (UnityEngine.Networking.NetworkWriter writer) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/Messages.cs:413)
UnityEngine.Networking.LocalClient.InvokeHandlerOnClient (Int16 msgType, UnityEngine.Networking.MessageBase msg, Int32 channelId) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/LocalClient.cs:160)
UnityEngine.Networking.ULocalConnectionToClient.Send (Int16 msgType, UnityEngine.Networking.MessageBase msg) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/LocalConnections.cs:24)
UnityEngine.Networking.NetworkServer.SendToReady (UnityEngine.GameObject contextObj, Int16 msgType, UnityEngine.Networking.MessageBase msg) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkServer.cs:356)
UnityEngine.Networking.NetworkAnimator.OnAnimationParametersServerMessage (UnityEngine.Networking.NetworkMessage netMsg) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkAnimator.cs:400)
UnityEngine.Networking.NetworkConnection.InvokeHandler (Int16 msgType, UnityEngine.Networking.NetworkReader reader, Int32 channelId) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkConnection.cs:183)
UnityEngine.Networking.NetworkServer.InvokeHandlerOnServer (UnityEngine.Networking.ULocalConnectionToServer conn, Int16 msgType, UnityEngine.Networking.MessageBase msg, Int32 channelId) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkServer.cs:1643)
UnityEngine.Networking.ULocalConnectionToServer.Send (Int16 msgType, UnityEngine.Networking.MessageBase msg) (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/LocalConnections.cs:83)
UnityEngine.Networking.NetworkAnimator.CheckSendRate () (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkAnimator.cs:177)
UnityEngine.Networking.NetworkAnimator.FixedUpdate () (at /Users/builduser/buildslave/unity/build/Extensions/Networking/Runtime/NetworkAnimator.cs:96)
I had this working fine in 5.2 do I now need to init this component in some way? All animations play locally without any issues. Any help is most appreciated.
I am also getting this exact error, and I don't know how to solve it.
In 5.1 it was fine.
In 5.2 is when the error messages started. I have no other error messages besides this.
Everything looks fine in the inspector, and animations work over the network just fine.
If I uncheck the Network Animator component, the errors stop -- but that isn't a proper solution.
Same issue seem tha Unity adjusts on thing and apart another......
Same issue here. Worked fine on 5.1 and this error showed up on 5.2, and even tough its keep throwing errors non-stop the animation works fine on the network.
Answer by Vasenkov · Oct 12, 2015 at 07:43 AM
In Play mode try to look at Network Animator component. There are should be checkboxes for parameters. If none of them are checked, there is that error. You can try to check 'em during Play Mode to test it. If there is no way to initialize Animator before playing (means, using a prefab) probably you should try to check all of the params with script. Check NetworkAnimator on Scripting Reference for more details.
For example, you can add this in your Start function in script on object with NetworkAnimator
for (int i = 0; i < GetComponent<Animator> ().parameterCount; i++)
GetComponent<NetworkAnimator> ().SetParameterAutoSend (i, true);
That still doesn't seem to solve my issue. I don't see a parameter list in the network animator and then programmatically enabling that parameter does nothing.
Answer by bknetwork · Dec 11, 2015 at 09:15 AM
I'm getting this issue too! Is there a bug fix in Unity 5.3 now?
This component magically started working for me again sometime in the 5.2.x releases. I have no idea why it wasn't working before that.
Your answer
![](https://koobas.hobune.stream/wayback/20220612033432im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Network Animator on child gameobjects 1 Answer
Placing my own animation idle&move to player 0 Answers
Animator Override controller SubstateMachine issue 0 Answers
Attach gun to two hands 0 Answers