guodong 1 سال پیش
والد
کامیت
e28f701eaa

+ 0 - 8
GameClient/Assets/AssetBundleCollectorSetting.asset

@@ -98,14 +98,6 @@ MonoBehaviour:
         FilterRuleName: CollectArtDynamic
         AssetTags: 
         UserData: 
-      - CollectPath: Assets/Res/Texture/Card/Bg
-        CollectorGUID: 6581c0e7a5abff64fb00dc0b5196eb4c
-        CollectorType: 0
-        AddressRuleName: AddressByFileName
-        PackRuleName: PackArt
-        FilterRuleName: CollectAll
-        AssetTags: 
-        UserData: 
     - GroupName: shader
       GroupDesc: 
       AssetTags: preload

+ 0 - 1
GameClient/Assets/GFGAsset/AssetBundleFilterRulerPreload.asset

@@ -18,7 +18,6 @@ MonoBehaviour:
   - Assets/Res/Texture/DressUp
   - Assets/Res/Texture/SceneBg
   - Assets/Res/Animation/Card
-  - Assets/Res/Texture/Card/Bg
   - Assets/Res/ShaderVariants
   - Assets/Res/shader
   - Assets/Res/MD5

+ 14 - 13
GameClient/Assets/Game/HotUpdate/Assets/PrefabManager.cs

@@ -1,4 +1,5 @@
-using UniFramework.Pooling;
+using System.Threading.Tasks;
+using UniFramework.Pooling;
 using UnityEngine;
 using YooAsset;
 
@@ -31,19 +32,19 @@ namespace GFGGame
             return handle.GameObj;
         }
 
-        //public async Task<GameObject> SpawnASync(string resPath)
-        //{
-        //    if (!_entitySpawner.IsGameObjectPoolExisted(resPath))
-        //    {
-        //        // 创建游戏对象池,销毁时间单位为秒
-        //        _entitySpawner.CreateGameObjectPoolSync(resPath, false, 0, 1, 60);
-        //    }
+        public async Task<GameObject> SpawnAsync(string resPath)
+        {
+            if (!_entitySpawner.IsGameObjectPoolExisted(resPath))
+            {
+                // 创建游戏对象池,销毁时间单位为秒
+                _entitySpawner.CreateGameObjectPoolSync(resPath, false, 0, 1, 60);
+            }
 
-        //    SpawnHandle handle = _entitySpawner.SpawnAsync(resPath);
-        //    await handle.Task;
-        //    AssetReleaserHelper.AddReleaserToSpawnObj(handle.GameObj, resPath, handle);
-        //    return handle.GameObj;
-        //}
+            SpawnHandle handle = _entitySpawner.SpawnAsync(resPath);
+            await handle.Task;
+            AssetReleaserHelper.AddReleaserToSpawnObj(handle.GameObj, resPath, handle);
+            return handle.GameObj;
+        }
 
         public GameObject InstantiateSync(string resPath)
         {

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Assets/PreloadManager.cs

@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+
+namespace GFGGame
+{
+    public class PreloadManager : SingletonBase<PreloadManager>
+    {
+        private Queue<string> waitLoadList = new Queue<string>();
+
+
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/Assets/PreloadManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bcc2e7d25120f184d82b55355572ddc9
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/DressUp/DressUpLayerOperation.cs

@@ -172,12 +172,12 @@ namespace GFGGame
         private void CheckLoadRes()
         {
             List<string> locations = new List<string>();
-            if(!string.IsNullOrEmpty(resPath))
+            if(!string.IsNullOrEmpty(resPath) && YooAssets.IsNeedDownloadFromRemote(resPath))
             {
                 //需加载
                 locations.Add(this.resPath);
             }
-            if(!string.IsNullOrEmpty(effectResPath))
+            if(!string.IsNullOrEmpty(effectResPath) && YooAssets.IsNeedDownloadFromRemote(resPath))
             {
                 //需加载
                 locations.Add(effectResPath);

+ 3 - 5
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -345,14 +345,12 @@ namespace GFGGame
             }
             string resName = _cardData.resources[_cardData.resIndex];
             string resPath = ResPathUtil.GetCardAnimationPath(_cardData.resources[_cardData.resIndex]);
-            if (_cardData.itemCfg.animationCardStar > 0 && _cardData.star >= _cardData.itemCfg.animationCardStar && YooAssets.CheckResExist(resPath))
+            if (_cardData.itemCfg.animationCardStar > 0 
+                && _cardData.star >= _cardData.itemCfg.animationCardStar 
+                && YooAssets.CheckResExist(resPath))
             {
                 _effectUI1 = new EffectUI();
                 _effectUI1.Reset(_ui.m_comCard.m_comCardHolder.m_holder, resName, resName, 100, EffectUIType.Card);
-            }
-
-            if (_effectUI1 != null)
-            {
                 _ui.m_c1.selectedIndex = 1;
                 _ui.m_comCard.target.scrollPane.SetPercX(0.5f, false);
                 _ui.m_comCard.target.SetScale(_cardScale, _cardScale);

+ 2 - 1
GameClient/Assets/Game/Launcher/Version/VersionController.cs

@@ -110,7 +110,8 @@ namespace GFGGame
             int downloadingMaxNum = 10;
             int failedTryAgain = 3;
             ResourcePackage package = YooAssets.GetPackage(packageName);
-            var downloaderOperation = package.CreateResourceDownloader(new string[] { "preload", "dynamic" }, downloadingMaxNum, failedTryAgain);
+            //ResourceDownloaderOperation downloaderOperation = package.CreateResourceDownloader(new string[] { "preload", "dynamic" }, downloadingMaxNum, failedTryAgain);
+            ResourceDownloaderOperation downloaderOperation = package.CreateResourceDownloader(new string[] { "preload" }, downloadingMaxNum, failedTryAgain);
 
             if (downloaderOperation.TotalDownloadCount == 0)
             {