com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
NetworkTransform can't be disabled via MonoBehaviour's enabled property, results in NT TICK DUPLICATE
If you disable NetworkTransform on all clients by setting the enabled property to false you get a bunch of these errors:
[Netcode] [NT TICK DUPLICATE] Server already sent an update on tick 2340 and is attempting to send again on the same network tick!
You can disable sync functionality without the errors by doing something like:
netTransform.Interpolate = false;
netTransform.SyncPositionX = false;
netTransform.SyncPositionY = false;
netTransform.SyncPositionZ = false;
netTransform.SyncRotAngleX = false;
netTransform.SyncRotAngleY = false;
netTransform.SyncRotAngleZ = false;
I would expect to be able to stop the NetworkTransform completely by setting enabled to false, or if that seems weird, then by some other mechanism.
Good catch and this just requires checking if it is enabled or not when updating and exiting early if not (or possibly de-registering)
@zachstronaut just confirming which version you are on. The error message is in 1.7.1 but changed during 1.8.0: https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/pull/2777 It might be enough for you to upgrade to resolve your error.
Closing this as I have received no more information. If this is still an issue on the latest version 1.9.1 feel free to re-open or make a new ticket.