no message

This commit is contained in:
2026-06-18 13:58:39 +08:00
parent 33070ad827
commit b08562d603
4936 changed files with 1887 additions and 21 deletions

View File

@@ -20,36 +20,59 @@ export function getUnityCdnBuildRoot() {
return `${getUnityCdnRoot()}/Build`;
}
/** 预取关卡库并注入,避免 LevelDatabase 回退到 /unity/ 或 editor 相对路径 */
export async function prefetchLevelsDatabase(cdnRoot) {
const root = String(cdnRoot || getUnityCdnRoot()).replace(/\/$/, '');
const jsonUrl = `${root}/levels-database.json`;
window.__tfrhLevelsDatabaseUrl = jsonUrl;
if (window.__tfrhLevelsDatabaseJson) {
return;
}
async function fetchJsonWithBrotli(jsonUrl) {
const brUrl = jsonUrl.replace(/\.json(\?.*)?$/i, '.json.br$1');
if (typeof DecompressionStream !== 'undefined') {
try {
const brRes = await fetch(brUrl);
if (brRes.ok) {
const text = await new Response(await brRes.arrayBuffer())
const ab = await brRes.arrayBuffer();
let text = new TextDecoder().decode(ab);
if (text.charCodeAt(0) !== 0x7b && text.charCodeAt(0) !== 0x5b) {
text = await new Response(ab)
.pipeThrough(new DecompressionStream('brotli'))
.text();
window.__tfrhLevelsDatabaseJson = JSON.parse(text);
return;
}
return JSON.parse(text);
}
} catch (e) {
console.warn('[unity-cdn] levels-database.json.br 预取失败,尝试 .json', e);
console.warn('[unity-cdn] Brotli 预取失败,尝试 .json', jsonUrl, e);
}
}
const res = await fetch(jsonUrl);
if (!res.ok) {
throw new Error(`levels-database HTTP ${res.status}: ${jsonUrl}`);
throw new Error(`HTTP ${res.status}: ${jsonUrl}`);
}
window.__tfrhLevelsDatabaseJson = await res.json();
return res.json();
}
/** 首屏只预取关卡库索引分片模式legacy 全量库作回退 URL */
export async function prefetchLevelsDatabase(cdnRoot) {
const root = String(cdnRoot || getUnityCdnRoot()).replace(/\/$/, '');
const indexUrl = `${root}/levels-db-index.json`;
const jsonUrl = `${root}/levels-database.json`;
window.__tfrhLevelsDbIndexUrl = indexUrl;
window.__tfrhLevelsDatabaseUrl = jsonUrl;
if (window.__tfrhLevelsDbIndex) {
return;
}
try {
const index = await fetchJsonWithBrotli(indexUrl);
if (index?.mode === 'sharded' && index.shards?.length) {
window.__tfrhLevelsDbIndex = index;
return;
}
} catch (e) {
console.warn('[unity-cdn] levels-db-index 预取失败,启动时将回退全量库', e);
}
if (window.__tfrhLevelsDatabaseJson) {
return;
}
window.__tfrhLevelsDatabaseJson = await fetchJsonWithBrotli(jsonUrl);
}

View File

@@ -167,15 +167,15 @@ const CONFIG = {
version: "20260520",
/** OSS 真实地址(生产环境浏览器直连) */
unityCdnRemote: 'https://oss.eanic.cn/001_code_cocos_res_20260616',
unityCdnRemote: 'https://oss.eanic.cn/001_code_cocos_res_20260617',
/** 方案 Bnginx / webpack 同源代理前缀(方案 A 直连 OSS 请保持 false */
unityCdnDevProxy: '/cdn-unity',
/** 本地 npm start 也走代理(仅 unityCdnUseSiteProxy 或此项为 true 时生效) */
unityCdnUseDevProxy: false,
/** 生产 nginx 反向代理 OSS 同路径时设为 true方案 B */
unityCdnUseSiteProxy: false,
unitycdndir: 'https://oss.eanic.cn/001_code_cocos_res_20260616',
unitycdnbuilddir: 'https://oss.eanic.cn/001_code_cocos_res_20260616/Build',
unitycdndir: 'https://oss.eanic.cn/001_code_cocos_res_20260617',
unitycdnbuilddir: 'https://oss.eanic.cn/001_code_cocos_res_20260617/Build',
python_pyodide_cdn_dir: 'https://oss.eanic.cn/001_code_python_res_20241213/pyodide/',
// 可以根据需要添加其他配置

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,126 @@
<linker>
<assembly fullname="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="AudioManager" preserve="all" />
<type fullname="Platformer.Controller.PlayerController" preserve="all" />
<type fullname="Platformer.Controller.PropController" preserve="all" />
<type fullname="Platformer.Controller.VehicleController" preserve="all" />
<type fullname="Platformer.Controller.ViewController" preserve="all" />
<type fullname="Platformer.Core.Health" preserve="all" />
<type fullname="Platformer.Core.UI.ButtonHandler" preserve="all" />
<type fullname="Platformer.Gameplay.LineGridRenderer" preserve="all" />
<type fullname="Platformer.Manager.GameManager" preserve="all" />
<type fullname="PopupController" preserve="all" />
<type fullname="SkinDialog" preserve="all" />
<type fullname="SkinItem" preserve="all" />
<type fullname="UIMain" preserve="all" />
</assembly>
<assembly fullname="Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.AddressableAssets.Addressables" preserve="all" />
</assembly>
<assembly fullname="Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" preserve="all">
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.LegacyResourcesProvider" preserve="all" />
<type fullname="UnityEngine.ResourceManagement.ResourceProviders.SceneProvider" preserve="all" />
</assembly>
<assembly fullname="Unity.TextMeshPro, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="TMPro.TextMeshPro" preserve="all" />
<type fullname="TMPro.TextMeshProUGUI" preserve="all" />
<type fullname="TMPro.TMP_FontAsset" preserve="all" />
<type fullname="TMPro.FaceInfo_Legacy" preserve="nothing" serialized="true" />
<type fullname="TMPro.FontAssetCreationSettings" preserve="nothing" serialized="true" />
<type fullname="TMPro.KerningTable" preserve="nothing" serialized="true" />
<type fullname="TMPro.TMP_Character" preserve="nothing" serialized="true" />
<type fullname="TMPro.TMP_FontFeatureTable" preserve="nothing" serialized="true" />
<type fullname="TMPro.TMP_FontWeightPair" preserve="nothing" serialized="true" />
<type fullname="TMPro.TMP_GlyphAdjustmentRecord" preserve="nothing" serialized="true" />
<type fullname="TMPro.TMP_GlyphPairAdjustmentRecord" preserve="nothing" serialized="true" />
<type fullname="TMPro.TMP_GlyphValueRecord" preserve="nothing" serialized="true" />
<type fullname="TMPro.VertexGradient" preserve="nothing" serialized="true" />
</assembly>
<assembly fullname="UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEditor.Audio.AudioMixerSnapshotController" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.AnimationModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.AnimationClip" preserve="all" />
<type fullname="UnityEngine.Animator" preserve="all" />
<type fullname="UnityEngine.AnimatorOverrideController" preserve="all" />
<type fullname="UnityEngine.RuntimeAnimatorController" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.AudioModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Audio.AudioMixer" preserve="all" />
<type fullname="UnityEngine.Audio.AudioMixerGroup" preserve="all" />
<type fullname="UnityEngine.AudioClip" preserve="all" />
<type fullname="UnityEngine.AudioListener" preserve="all" />
<type fullname="UnityEngine.AudioSource" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Camera" preserve="all" />
<type fullname="UnityEngine.GameObject" preserve="all" />
<type fullname="UnityEngine.LightmapSettings" preserve="all" />
<type fullname="UnityEngine.LineRenderer" preserve="all" />
<type fullname="UnityEngine.Material" preserve="all" />
<type fullname="UnityEngine.MeshRenderer" preserve="all" />
<type fullname="UnityEngine.Object" preserve="all" />
<type fullname="UnityEngine.RectTransform" preserve="all" />
<type fullname="UnityEngine.Rendering.SortingGroup" preserve="all" />
<type fullname="UnityEngine.RenderSettings" preserve="all" />
<type fullname="UnityEngine.Shader" preserve="all" />
<type fullname="UnityEngine.Sprite" preserve="all" />
<type fullname="UnityEngine.SpriteRenderer" preserve="all" />
<type fullname="UnityEngine.Texture2D" preserve="all" />
<type fullname="UnityEngine.Transform" preserve="all" />
<type fullname="UnityEngine.U2D.SpriteAtlas" preserve="all" />
<type fullname="UnityEngine.Events.PersistentCallGroup" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.RectOffset" preserve="nothing" serialized="true" />
</assembly>
<assembly fullname="UnityEngine.GridModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Grid" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.Physics2DModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.BoxCollider2D" preserve="all" />
<type fullname="UnityEngine.Rigidbody2D" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Font" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.TilemapModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Tilemaps.Tile" preserve="all" />
<type fullname="UnityEngine.Tilemaps.Tilemap" preserve="all" />
<type fullname="UnityEngine.Tilemaps.TilemapRenderer" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.EventSystems.EventSystem" preserve="all" />
<type fullname="UnityEngine.EventSystems.StandaloneInputModule" preserve="all" />
<type fullname="UnityEngine.UI.Button" preserve="all" />
<type fullname="UnityEngine.UI.CanvasScaler" preserve="all" />
<type fullname="UnityEngine.UI.ContentSizeFitter" preserve="all" />
<type fullname="UnityEngine.UI.GraphicRaycaster" preserve="all" />
<type fullname="UnityEngine.UI.GridLayoutGroup" preserve="all" />
<type fullname="UnityEngine.UI.Image" preserve="all" />
<type fullname="UnityEngine.UI.Mask" preserve="all" />
<type fullname="UnityEngine.UI.Scrollbar" preserve="all" />
<type fullname="UnityEngine.UI.ScrollRect" preserve="all" />
<type fullname="UnityEngine.UI.VerticalLayoutGroup" preserve="all" />
<type fullname="UnityEngine.UI.AnimationTriggers" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.Button/ButtonClickedEvent" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.ColorBlock" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.MaskableGraphic/CullStateChangedEvent" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.Navigation" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.ScrollRect/ScrollRectEvent" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.Scrollbar/ScrollEvent" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.UI.SpriteState" preserve="nothing" serialized="true" />
</assembly>
<assembly fullname="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
<type fullname="UnityEngine.Canvas" preserve="all" />
<type fullname="UnityEngine.CanvasGroup" preserve="all" />
<type fullname="UnityEngine.CanvasRenderer" preserve="all" />
</assembly>
<assembly fullname="UnityEngine.TextCoreFontEngineModule">
<type fullname="UnityEngine.TextCore.FaceInfo" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.TextCore.Glyph" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.TextCore.GlyphMetrics" preserve="nothing" serialized="true" />
<type fullname="UnityEngine.TextCore.GlyphRect" preserve="nothing" serialized="true" />
</assembly>
</linker>

Some files were not shown because too many files have changed in this diff Show More