Quantcast
Channel: Latest Questions by MiniForge
Viewing all articles
Browse latest Browse all 21

Multiplayer - Handling players leaving

$
0
0
What is the proper way to handle a player leaving a server during a game match? Currently, I have the OnPlayerDisconnected method as follows. void OnPlayerDisconnected(NetworkPlayer player){ Network.RemoveRPCs (player); print ("Player has left. Destroying their objects"); Network.DestroyPlayerObjects (player); } However this still throws the error **Couldn't send RPC function** twice after the player leaves. The RPC that it is failing to send is a RPCMode.All from the host. **Edit**: When a player leaves, the host still tries to send a RPC to the disconnected player for about two frames. Is there any way to stop the host's gameobjects from sending the RPC's to the objects that will soon be disconnected

Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>