简体   繁体   中英

Unity3d Networking: What happens to networking when the player receives a phone call?

I am building a multiplayer, turn based cards game . Since the answer to these question is not available in the docs, I am asking it here:

The game uses Unity's networking HLAPI (NetworkClient and NetworkServer), and the client & server communicate exclusively with NetworkMessages, no RPC is used. What happens when:

(a) The client on an android smartphone is connected to the server & playing, and the player suddenly receives a call? With the client disconnect, or will it continue to send messages, or will it stall, not accepting any messages?

(b) The player is playing over 3G and suddenly decides to switch over to Wi-Fi with the game still running. Will the client disconnect, or will the game somehow continue to run and the client stays connected to the server?

a) If you are using 3g & receive call then , its obvious player will get disconnected .

b) If you are on wifi and receive call then , you will not get disconnected if your android can handle keeping your game in memory .

c) If you switch network , the disconnection will depend upon game server . Server will handle the part if the player reconnection should be whole new or just reconnect were he left .

Looking to your game , the server should reconnect as new connection .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM