From 3e896c7ddb83106919b590d5a9eda19f8332dfd2 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 22 十一月 2025 14:09:55 +0800
Subject: [PATCH] 0312 红点整理切换账号问题
---
Main/ResModule/AssetBundle/AssetBundleUtility.cs | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Main/ResModule/AssetBundle/AssetBundleUtility.cs b/Main/ResModule/AssetBundle/AssetBundleUtility.cs
index 0337822..8f8fae0 100644
--- a/Main/ResModule/AssetBundle/AssetBundleUtility.cs
+++ b/Main/ResModule/AssetBundle/AssetBundleUtility.cs
@@ -99,8 +99,9 @@
public async UniTask Initialize()
{
+ await UniTask.Delay(200);
await Co_LoadMainfestFile("audio");
- await Co_LoadMainfestFile("video");
+ // await Co_LoadMainfestFile("video");
await Co_LoadMainfestFile("mobeffectshader");
await Co_LoadMainfestFile("config");
await Co_LoadMainfestFile("maps");
@@ -369,7 +370,11 @@
public UnityEngine.Object Sync_LoadAsset(string assetBundleName, string assetName, Type _type = null)
{
-
+ if (string.IsNullOrEmpty(assetName))
+ {
+ Debug.LogErrorFormat("Sync_LoadAsset(): {0}, 鍑虹幇閿欒 => 瀛樺叆鐨凙ssetName涓簄ull. ", assetName);
+ return null;
+ }
#if UNITY_5||UNITY_5_3_OR_NEWER
assetBundleName = assetBundleName.ToLower();
#endif
@@ -434,6 +439,8 @@
var isBuiltin = assetBundleName.Contains("builtin");
string _path = isBuiltin ? AssetVersionUtility.GetBuiltInAssetFilePath(assetBundleName) : AssetVersionUtility.GetAssetFilePath(assetBundleName);
+ Debug.LogFormat("Sync_LoadAssetBundle(): {0} => {1}", assetBundleName, _path);
+
AssetBundle _assetBundle = AssetBundle.LoadFromFile(_path);
CacheAssetBundle(assetBundleName, _assetBundle);
--
Gitblit v1.8.0