So I override the NetworkManager.OnServerAddPlayer method, searches for an unassociated server pre-created player objects (controlled by AI) from a pool, and call NetworkServer.AddPlayerForConnection to associate this player object to the connection.
However, when the client disconnects, I wanted the previously associated player object not to be destroyed per client disconnect, but just return this player object back to the server player object pool and have the server AI to control the object again.
I was trying to override NetworkManager.OnServerRemovePlayer, and tried to either set player.gameObject to null, or call NetworkServer.ReplacePlayerForConnection with a null game object with the same player controller ID, and both approaches seem to not prevent the player object to be destroyed from the server when the associated client is disconnected.
So, is there a good way to prevent the connection player object to be destroyed on the server at all?