This commit is contained in:
2026-10-09 22:06:36 +08:00
parent 3a985587bf
commit 1f4c19904f
25 changed files with 715 additions and 371 deletions
@@ -1396,6 +1396,8 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
await AudioResourcesData.UnLoadAudioGame();
if (flow != _resourceFlowToken) return;
UnLoadBulletClip(); // ⭐ 释放开火音效句柄(引用计数归零)
TurretResourcesData.UnloadAllZhanShen(ZhanShenUsage.GamePlay); // ⭐ 卸载按需加载的战神(游戏内)
TurretResourcesData.UnloadAllTurretPrefabs(); // ⭐ 卸载按需加载的炮台/翅膀 prefab
await MonsterMoveLine.UnLoadBezier();
if (flow != _resourceFlowToken) return;
// ⭐ 清空子弹池 + 特效池(鱼池已在 UnLoadFishAssetsData 内清理)
@@ -1445,6 +1447,8 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
await FishResourcesData.UnLoadFishAssetsData();
await AudioResourcesData.UnLoadAudioGame();
UnLoadBulletClip();
TurretResourcesData.UnloadAllZhanShen(ZhanShenUsage.GamePlay);
TurretResourcesData.UnloadAllTurretPrefabs();
await MonsterMoveLine.UnLoadBezier();
Debug.Log("[ChangeRoom] 切房失败,游戏资源已补卸载");
}
@@ -1530,6 +1534,8 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
SetUnloadProgress(0.4f);
await AudioResourcesData.UnLoadAudioGame();
UnLoadBulletClip(); // ⭐ 释放开火音效句柄(引用计数归零)
TurretResourcesData.UnloadAllZhanShen(ZhanShenUsage.GamePlay); // ⭐ 卸载按需加载的战神(游戏内)
TurretResourcesData.UnloadAllTurretPrefabs(); // ⭐ 卸载按需加载的炮台/翅膀 prefab
SetUnloadProgress(0.6f);
await MonsterMoveLine.UnLoadBezier();