From 1ab047b5fdd933c38ba0519ec2e83a44512ea8d7 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期四, 26 三月 2026 17:46:11 +0800
Subject: [PATCH] webgl代码合并 1

---
 Main/ResModule/BuiltInLoader.cs |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Main/ResModule/BuiltInLoader.cs b/Main/ResModule/BuiltInLoader.cs
index 8c00524..98aee23 100644
--- a/Main/ResModule/BuiltInLoader.cs
+++ b/Main/ResModule/BuiltInLoader.cs
@@ -19,7 +19,12 @@
     public static async UniTask<Sprite> LoadSpriteAsync(string name, CancellationToken ct = default)
     {
         var path = StringUtility.Concat("Assets/ResourcesOut/BuiltIn/Sprites/", name, SPRITE_EXTENSION);
-        return await YooAssetService.Instance.LoadAssetAsync<Sprite>(path, ct: ct);
+        var sprite = await YooAssetService.Instance.LoadAssetAsync<Sprite>(path, ct: ct);
+#if UNITY_WEBGL
+        if (sprite == null)
+            Debug.LogWarning($"[BuiltInLoader][WebGL-Diag] Sprite load returned NULL: path={path}");
+#endif
+        return sprite;
     }
 
     public static async UniTask<GameObject> LoadPrefabAsync(string name, CancellationToken ct = default)

--
Gitblit v1.8.0