Version: 2017.1
public void SetMatchHost (string newHost, int port, bool https);

参数

newHost MatchMaker 服务的主机名。
port MatchMaker 服务的端口。
https MatchMaker 服务使用的协议。

描述

此方法可设置 MatchMaker 服务的地址。

MatchMaker 的默认地址为 mm.unet.unity3d.com。 使用该地址后,客户端将连接到地理位置上最近的数据中心。但是,由于各数据中心互相孤立,玩家只能看到他们当前连接到的数据中心内发生的匹配。例如,如果游戏玩家正在前往世界另一端,可能会与所在数据中心内的另一组不同的玩家互动。 您可以通过指定特定数据中心来重载此行为。请记住,通常距离越远,延迟就越高,这就是我们的数据中心遍布世界各地的原因。

要连接到特定数据中心,请使用以下地址之一:

美国:us1-mm.unet.unity3d.com 欧洲:eu1-mm.unet.unity3d.com 新加坡:ap1-mm.unet.unity3d.com。