Ship the WeChat hot-update catalogs and the camp, TideWhale T2, UI atlas, and animation-lab work.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,7 +11,7 @@ namespace HotUpdate.Net
|
||||
public sealed class GameNet : MonoBehaviour
|
||||
{
|
||||
public string HttpBase = AuthApi.DefaultHttpBase;
|
||||
public string WsUrlTemplate = "wss://game.xworld.ren/ws?pid={pid}&token={token}";
|
||||
public string WsUrlTemplate = AuthApi.DefaultWsTemplate;
|
||||
|
||||
public SessionData Session { get; private set; }
|
||||
public WsClient Socket { get; private set; }
|
||||
@@ -60,6 +60,27 @@ namespace HotUpdate.Net
|
||||
}
|
||||
WsUrlTemplate = tpl;
|
||||
}
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
// Serialized Boot scenes used for local Editor testing must not send players to loopback.
|
||||
HttpBase = ResolveRemoteEndpoint(HttpBase, "https", AuthApi.DefaultHttpBase);
|
||||
WsUrlTemplate = ResolveRemoteEndpoint(WsUrlTemplate, "wss", AuthApi.DefaultWsTemplate);
|
||||
_boot.HttpBase = HttpBase;
|
||||
_boot.WsUrlTemplate = WsUrlTemplate;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static string ResolveRemoteEndpoint(string value, string scheme, string fallback)
|
||||
{
|
||||
if (Uri.TryCreate(value, UriKind.Absolute, out var uri) &&
|
||||
uri.Scheme == scheme && !uri.IsLoopback && !uri.Host.EndsWith(".localhost", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Migrate the former production defaults stored in already-shipped Boot scenes.
|
||||
if (uri.IsDefaultPort && uri.Host.Equals("game.xworld.ren", StringComparison.OrdinalIgnoreCase) &&
|
||||
((scheme == "https" && uri.AbsolutePath == "/") || (scheme == "wss" && uri.AbsolutePath == "/ws")))
|
||||
return fallback;
|
||||
return value;
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
|
||||
public void StartGuestSession()
|
||||
|
||||
Reference in New Issue
Block a user