- Home /
Question by
Theacesofspades · Oct 15, 2012 at 02:35 AM ·
networkingmultiplayernot working
Network Disconnecting
Hey i am new to multiplayer games and i was following the multiplayer tutorial and it works fine except for the disconnecting part. I have the script:
var me : Transform;
function OnNetworkLoadedLevel ()
{
Network.Instantiate(me, transform.position, transform.rotation, 0);
}
function OnPlayerDisconnected (player : NetworkPlayer)
{
Network.RemoveRPCs(player, 0);
Network.DestroyPlayerObjects(player);
}
Whenever i disconnect the cube doesnt get destroyed, can someone help me on why the OnPlayerDisconnected isnt being called? Thanks
Comment
I also have similar problem. OnPlayerDisconnected is not called... and couldn't find the solution :( Hope there is an easy fix to this.
Add a Debug.Log() into the OnPlayerDisconnected function and see if it is actually being called.
Your answer