Search Unity

Client disconnecting causes errors / warnings

Discussion in 'Multiplayer' started by Deleted User, May 17, 2017.

  1. Deleted User

    Deleted User

    Guest

    Hey all,
    I recently upgraded my project to version 5.6, so far everything works well expect for one thing. Everytime a client disconnects from the host / server, the client object freezes for around 2/3 seconds before destroying itself on the server / other clients. Which goes along with these three errors:
    problem1.png
    I'm using the NetworkManager.singleton.StopHost(); function for disconnecting. Already tried stopclient, etc but thats doesnt resolve it sadly.
    Anyone knows how to prevent this from happening?

    Thank in advance!
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    I think you are trying to send a command after the player has been destroyed.
     
  3. Deleted User

    Deleted User

    Guest

    Tried disabling every component which uses network features (except for the networkidentity) on my player when they hit the disconnect button, at first it worked. Restarted unity same issue occurred again..
     
  4. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
  5. Deleted User

    Deleted User

    Guest

    Tried calling networkclient.disconnect a few frames before calling stopHost. No improvement, same thing keeps happening. Probably my only option so far is to wait for a patch which hopefully does fix this issue. Or that someone finds a way to avoid this issue. Which is actually a bit of a shame because I was planning to release this asset in the next few days.
     
  6. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Same. I haven't found solution either.