浏览代码

Minor logging change, and upgrade package. I've tested in 2021.2.0b11 that this works with DTLS active, although it might need a little more rigor since I had intermittent issues with one editor (but not so much the other?) failing to fully connect to Relay for some reason (i.e. getting stuck in the "Connecting..." state).

/main/staging/relay_dtls
nathaniel.buck@unity3d.com 3 年前
当前提交
123815cb
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 2
      Assets/Scripts/Relay/RelayUtpClient.cs
  2. 4
      Packages/manifest.json
  3. 2
      Packages/packages-lock.json

2
Assets/Scripts/Relay/RelayUtpClient.cs


MsgType msgType = (MsgType)msgContents[0];
int idLength = msgContents[1];
if (msgContents.Count < idLength + 2)
{ UnityEngine.Debug.LogWarning($"Relay client processed message of length {idLength}, but contents were of length {msgContents.Count}.");
}
string id = System.Text.Encoding.UTF8.GetString(msgContents.GetRange(2, idLength).ToArray());
if (id == m_localUser.ID || !m_localLobby.LobbyUsers.ContainsKey(id)) // We don't need to hold onto messages if the ID is absent; users are initialized before they send events.

4
Packages/manifest.json


"com.unity.test-framework": "1.1.27",
"com.unity.textmeshpro": "3.0.6",
"com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.20-preview",
"com.unity.transport": "1.0.0-pre.3",
"com.unity.transport": "1.0.0-pre.5",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",

"com.unity.modules.xr": "1.0.0"
},
"scopedRegistries": []
}
}

2
Packages/packages-lock.json


"url": "https://packages.unity.com"
},
"com.unity.transport": {
"version": "1.0.0-pre.3",
"version": "1.0.0-pre.5",
"depth": 0,
"source": "registry",
"dependencies": {

正在加载...
取消
保存