Fishnet version : 4.6.5Pro
Hello ! So we stumbled upon a very specific bug : When changing scene, network objects present are destroyed by unity. When the pooled object are destroyed this way, on host, OnStopNetwork is not called. So from what I gathered :
-
First
OnDisableis called, triggering aNetworkObject.DeinitializewithasServeras true. This triggers aStoreObject()in the pool, wich triggers aNetworkObject.ResetState()setting theNetworkObject.NetworkManagerto null.
TheDeinitializealso callsInvokeStopCallbackswithasServer= true. This will callOnStopServerbut notOnStopNetworkas the object is still initialized for the client (line 128), this is expected as the client part of the object is meant to be stopped onOnDestroy. -
Then
OnDestroyedis called but asNetworkObject.NetworkManageras set to null in theResetState()previously, we skip all stop callback that should have been called for the client.
In particular this causes NetworkTransform to not unregister TimeManager_OnPostTick which spams null ref exceptions.