Description
The NetworkBehaviour's "OnSpawnServer" is called twice AND "OnDespawnServer" is called once on a wrong object, and twice on the right object.
Replication
Steps to reproduce the behavior:
Set a NetworkObject with a NetworkBehaviour script that has OnSpawnServer and OnSpawnServer as the player.
In both function, write a print statement that shows the method has been called, with the OwnerId to show which object gets the call.
Start a host ("OnSpawnServer" is called twice for owner 0)
Make a client join the server. ("OnSpawnServer" is called twice for owner 1)
Make the client leave the server ("OnDespawnServer" is called once on the wrong object, and twice on the client)
Expected behavior
OnSpawnServer is only ever called once, and is called on the right object.
General Unity version: 2022.3.37f1 (LTS) Fish-Networking version: 4.3.8R Discord link: https://discord.com/channels/424284635074134018/1272411047394934885
Description The NetworkBehaviour's "OnSpawnServer" is called twice AND "OnDespawnServer" is called once on a wrong object, and twice on the right object.
Replication Steps to reproduce the behavior: Set a NetworkObject with a NetworkBehaviour script that has
OnSpawnServer
andOnSpawnServer
as the player. In both function, write a print statement that shows the method has been called, with the OwnerId to show which object gets the call.Expected behavior OnSpawnServer is only ever called once, and is called on the right object.
Screenshots