Closed AnKO314 closed 3 years ago
With version 1.0.0 we have introduced a NetworkRigidbody component directly in our Netcode for GameObjects package. I suggest upgrading to the latest version and using our first party Networkrigidbody. It shouldn't have the issues mentioned here.
I simply added some NetworkRigidbody in the scene, when I connect to a server, I get an exception :
For each one in the scene.
It concerns one of the NetworkVariableVector3 variable (netVelocity, netAngularVelocity or netPosition) because I have as many messages like this as the previous error message
I don't know how MLAPI handles the NetworkVariable but I changed the order of declaration like this : And it still crashes on NetworkVariableVector3. I was expecting that it would crash on NetworkVariableQuaternion. But maybe the order by which it accesses NetworkVariable has nothing to do with their order in the class. But in the other case, the issue could be related specificaly to NetworkVariableVector3...
For now, the only way I found to make the exception disapear is to add a return as the first instruction in the FixedUpdate. Which is quite inadequate. To say the least.
I didn't modify the script whatsoever. The only interaction I have with it is enabling and disabling it given some conditions.
Have you any idea on why this could happen ?