guodong преди 1 година
родител
ревизия
012abd162c
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 1
      GameClient/Assets/Game/HotUpdate/Assets/SpriteHelper.cs
  2. 0 1
      GameClient/Assets/Game/HotUpdate/DressUp/SceneController.cs

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Assets/SpriteHelper.cs

@@ -10,9 +10,10 @@ namespace GFGGame
         /// </summary>
         /// <param name="spr"></param>
         /// <param name="resPath"></param>
-        public static void AddSpriteTo(SpriteRenderer spr, string resPath)
+        public static async void AddSpriteTo(SpriteRenderer spr, string resPath)
         {
             RemoveSpriteFrom(spr);
+            await LoadManager.Instance.CheckResExsitedOrDownload(resPath);
             var handle = YooAssets.LoadAssetSync<Sprite>(resPath);
             Sprite sp = handle.AssetObject as Sprite;
             GameObject gameObject = spr.gameObject;

+ 0 - 1
GameClient/Assets/Game/HotUpdate/DressUp/SceneController.cs

@@ -109,7 +109,6 @@ namespace GFGGame
                 StoryDialogDataManager.Instance.waitPicFade = true;
 
                 var resPath = ResPathUtil.GetNpcPicSPath(value);
-                await LoadManager.Instance.CheckResExsitedOrDownload(resPath);
                 SpriteHelper.AddSpriteTo(spr, resPath);
                 SetSpriteRendererAlpha(spr, 0f);
                 FairyGUI.Timers.inst.StartCoroutine(UpdateDialogPicAlpha());