DisconnectByServer

Hello,
I am new in photon networking.
I used photon bootcamp demo API in my game but now i have encounter with one problem.
My game running fine in Unity editor in multiplayer mode but when i rum it on my IOS device and load a scene from my lobby scene to create room it disconnect from photon.
I debug disconnect cause and it gives me DisconnectByserver.
What is the reason of this cause and why it disconnecting only when i run on my device.
It also working fine when i make a PC build.
Sorry for my english.
Please help me.

Comments

  • This will be related to Unity not calling Update() during load times. As they are longer on the device, Update() isn't called and also the peer's Service() call will pause too long and thus can't keep the connection alive.
    You should create a Thread that you start before you load stuff. Then call SendAcksOnly() in the thread. Alternatively (in older libs) set PhotonPeer.IsSendingOnlyAcks = true on thread start and call SendOutgoingCommands() in the thread and on thread end, set IsSendingOnlyAcks = false again.
    You have to clean up the Thread when you're done loading.

    Edit: We haven't been aware of this issue when we created the demo and didn't update it accordingly. I'm sorry you ran into this issue due to that.
  • Thanks for reply Tobias. I will following your suggestions and let you update soon.