Initial commit: Client Doc docs Server Tools

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ud18010
2026-07-10 10:24:29 +08:00
co-authored by Cursor
commit 7e35d8da31
3374 changed files with 680813 additions and 0 deletions
@@ -0,0 +1,29 @@
using System.IO;
using UnityEngine;
namespace XGame.MiniGame
{
// 小游戏 CDN 的平台段(与 LoadDll.sPlatform / CDN 目录命名一致),及平台相关的本地 AB 打开方式
public static class MiniGamePlatform
{
#if UNITY_ANDROID
public const string Name = "android";
#elif UNITY_IOS
public const string Name = "ios";
#elif UNITY_WEBGL
public const string Name = "webgl";
#else
public const string Name = "pc";
#endif
// WebGL 无同步文件系统 mmapLoadFromFile 不可用 → 读字节走 LoadFromMemory;其余平台 LoadFromFile 更省内存
public static AssetBundle LoadAssetBundle(string localPath)
{
#if UNITY_WEBGL
return AssetBundle.LoadFromMemory(File.ReadAllBytes(localPath));
#else
return AssetBundle.LoadFromFile(localPath);
#endif
}
}
}