Browse Source

change UICustom cs

Jidongchen 3 years ago
parent
commit
eb74386fa9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Assets/GameMain/Scripts/UI/UICustom.cs

+ 2 - 1
Assets/GameMain/Scripts/UI/UICustom.cs

@@ -130,6 +130,7 @@ namespace MetaClient
 
 
 
+
         /// <summary>
         /// 滑块改变
         /// </summary>
@@ -220,7 +221,7 @@ namespace MetaClient
         private void RemoveAllChildren(GameObject parent)
         {
             Transform transform;
-            for (int i = parent.transform.childCount; i > parent.transform.childCount; i--)
+            for (int i = 0; i < parent.transform.childCount; i++)
             {
                 transform = parent.transform.GetChild(i);
                 GameObject.Destroy(transform.gameObject);