Search Unity

ReplacePlayerForConnection BUG? Still have authority??

Discussion in 'Multiplayer' started by Royall, Nov 21, 2015.

  1. Royall

    Royall

    Joined:
    Jun 15, 2013
    Posts:
    121
    Hi guys,

    So I am struggling with the ReplacePlayerForConnection function of UNET.
    I want to replace the player with a new one once he respawns, but I want the corpse to stay on the ground (old player object).

    Now the switch is working, but somehow I still have a connection with the old player object because when I for example disconnect, both objects get destroyed... Why doesn't give ReplacePlayerForConnection back the authority to the server??

    Anyone experienced something similair or is it a bug?

    Thx in advance :)

    http://docs.unity3d.com/ScriptReference/Networking.NetworkServer.ReplacePlayerForConnection.html