Unity 的 Multiplayer 系统完全兼容桌面端、iOS 和 Android 设备,所有这些平台上的玩家都可以一起游玩您的多人游戏。
如果游戏主要在 Wi-Fi 或蜂窝网络条件下使用,可能希望实施特殊手段。在某些移动设备上,网络芯片可能成为性能瓶颈,因为移动设备之间(或者移动设备与桌面端之间)的 ping 可能大约需要 40 到 60 毫秒,即使是在高性能 Wi-Fi 网络上,尽管平均 ping 值很低,但也可能会观察到某些超过 200 毫秒的延迟。
为了让玩家同时从桌面平台和移动平台(通过 Wi-Fi 或蜂窝网络)玩游戏,游戏服务器应具有一个可以通过互联网访问的公共 IP 地址,或者使用 Matchmaker 和 Relay 服务。
注意:在不发送数据时,EDGE/3G 数据连接将很快进入睡眠状态。因此,有时候可能需要“唤醒”连接。如果使用 WWW 类,请在进行 Unity 网络连接之前确保连接到站点(并在完成之前取得结果)。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.