Created
August 17, 2011 09:49
-
-
Save AngryAnt/1151218 to your computer and use it in GitHub Desktop.
Proper cleanup after players in a Unity networked game.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void OnPlayerDisconnected (NetworkPlayer player) | |
{ | |
Network.RemoveRPCs (player); | |
Network.DestroyPlayerObjects (player); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment