【更新】NAT Traversal 1.65
本帖最后由 微笑的猫 于 2024-7-16 16:48 编辑MNAT Traversal 系列索引:
NAT Traversal 1.55下载链接
NAT Traversal 1.64下载链接
Adds NAT punch-through and automatic port forwarding to UNet.
Simple drop in setup for UNET. You only need three methods: StartHostAll(), ListMatches(), and StartClientAll() to connect. Your other UNET code remains unchanged.
Reduce your use of expensive relay servers by up to 95%, meaning you only spend money as little as 5% of the time! Use Unity's own calculator to see just how much money you'll save.
Minimize latency by connecting players directly whenever possible, even behind routers. Optionally falls back to Unity's relay servers only if NAT traversal fails, so players can always connect.
Direct connect whenever possible
Why waste your hard earned money using bandwidth on the relay servers if you don't have to? A direct connection means less lag and less dependence on infrastructure that you don't control.
Seamless connection replacing
Your players will always use the best connection possible, seamlessly switching from relay to direct connections as they become available.
Connect Faster
Gets your players in the game faster by not waiting for a UNET match to be created or joined before connecting.
Host Migration
Fully supports UNet's built in Host Migration. No more dropped games, even if the host leaves.
Lobby
Includes a lobby script that exactly emulates UNET's NetworkLobby.
Example scenes
Example scenes are included that demonstrate using NAT Traversal with lobbies, host migration, and our Match Up plugin.
为 UNet 添加 NAT 穿透和自动端口转发。
为 UNET 进行简单的插入设置。您只需要三种方法:StartHostAll()、ListMatches() 和 StartClientAll() 即可连接。您的其他 UNET 代码保持不变。
减少使用昂贵的中继服务器高达 95%,这意味着您只花费了 5% 的时间!使用 Unity 自己的计算器查看您将节省多少钱。
尽可能直接连接玩家,即使在路由器后面,也可以最大限度地减少延迟。只有当 NAT 遍历失败时,才可以选择回退到 Unity 的中继服务器,这样玩家就可以始终连接。
尽可能直接连接
如果没有必要,为什么要浪费您辛苦赚来的钱使用中继服务器上的带宽?直接连接意味着更少的延迟和对您无法控制的基础设施的依赖。
无缝连接替换
您的玩家将始终使用最佳连接,在中继连接可用时无缝切换到直接连接。
连接更快
无需等待 UNET 比赛创建或加入即可连接,让您的玩家更快地进入游戏。
主机迁移
完全支持 UNet 内置的主机迁移。即使主机离开,也不会再出现游戏掉线的情况。
大厅
包含一个大厅脚本,可精确模拟 UNET 的 NetworkLobby。
示例场景
包含示例场景,演示如何使用 NAT 遍历进行大厅、主机迁移和我们的 Match Up 插件。
页:
[1]