Add hot-update boot pipeline, UI bundles/atlas assets, and design docs.
Ignore AIClient/Library and AIClient/HybridCLRData permanently; include HybridCLR/YooAsset project setup and UI tooling. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using YooAsset;
|
||||
|
||||
namespace AOT.Boot
|
||||
{
|
||||
/// <summary>
|
||||
/// 壳层传给热更入口的运行时上下文。
|
||||
/// </summary>
|
||||
public sealed class BootContext
|
||||
{
|
||||
public string AppVersion;
|
||||
public string ResVersion;
|
||||
public string CdnRoot;
|
||||
public string PackageName;
|
||||
public ResourcePackage Package;
|
||||
public string WsUrlTemplate;
|
||||
|
||||
public string BuildWsUrl(string pid, string token = null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(WsUrlTemplate))
|
||||
{
|
||||
if (string.IsNullOrEmpty(token))
|
||||
return $"wss://game.xworld.ren/ws?pid={pid}";
|
||||
return $"wss://game.xworld.ren/ws?pid={pid}&token={UnityEngine.Networking.UnityWebRequest.EscapeURL(token)}";
|
||||
}
|
||||
|
||||
var url = WsUrlTemplate.Replace("{pid}", pid ?? string.Empty);
|
||||
if (url.Contains("{token}"))
|
||||
url = url.Replace("{token}", UnityEngine.Networking.UnityWebRequest.EscapeURL(token ?? string.Empty));
|
||||
else if (!string.IsNullOrEmpty(token))
|
||||
url += (url.Contains("?") ? "&" : "?") + "token=" + UnityEngine.Networking.UnityWebRequest.EscapeURL(token);
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user