Browse Source

再试试

Void_F 8 months ago
parent
commit
5d0fb0a151
2 changed files with 4 additions and 4 deletions
  1. 2 2
      Assets/MapGenerator.cs
  2. 2 2
      Assets/Scripts/TextureLoadHelp.cs

+ 2 - 2
Assets/MapGenerator.cs

@@ -40,15 +40,15 @@ public class MapGenerator : MonoBehaviour
 
     private IEnumerator CreatMap()
     {
-        WaitForEndOfFrame wait = new WaitForEndOfFrame();
+        WaitForSeconds wait = new WaitForSeconds(0.01f);
         isInit = true;
         for (int i = 0; i < x_Count; i++)
         {
             for (int j = 0; j < y_Count; j++)
             {
                 GeneratorQuad(i, j, new Vector2(1, 1));
-                yield return wait;
             }
+            yield return wait;
         }
     }
 

+ 2 - 2
Assets/Scripts/TextureLoadHelp.cs

@@ -16,7 +16,7 @@ public class TextureLoadHelp : MonoBehaviour
     private Dictionary<long, Material> waitLoadImgActionList;
     
     public float currentTotalSize = 0;
-    public float maxSize = 200; //图片缓存-m
+    public float maxSize = 500; //图片缓存-m
 
     private Dictionary<string, AssetBundle> loadDoneABList;
     private Dictionary<string, int> loadingABList;
@@ -105,7 +105,7 @@ public class TextureLoadHelp : MonoBehaviour
     {
         if (loadingABList.ContainsKey(ab_Name))
         {
-            Debug.Log($"{ab_Name} downloading...wait");
+            //Debug.Log($"{ab_Name} downloading...wait");
             yield return new WaitUntil(() => loadingABList[ab_Name] > 0);
             // if (loadingABList.ContainsKey(ab_Name))
             // {