using System.Collections.Generic; using UnityEngine.UI; public class GainCardList : uScrollViewMgr { public GridLayoutGroup m_Grid; public void Set(List lst) { var totallst = new List(); for (int i = 0; i < lst.Count; i++) totallst.Add(lst[i]); { var makecount = 12 - totallst.Count; for (int i = 0; i < makecount; i++) totallst.Add(null); } //if (totallst.Count < 6) //{ // var makecount = 6 - totallst.Count; // for (int i = 0; i < makecount; i++) // totallst.Add(null); // m_Content.transform.localScale = Vector2.one; // (m_Content.transform as RectTransform).sizeDelta = new Vector2(794f, 451f); //} //else if (totallst.Count > 6) //{ // var makecount = 15 - totallst.Count; // for (int i = 0; i < makecount; i++) // totallst.Add(null); // m_Content.transform.localScale = Vector2.one * 0.66f; // (m_Content.transform as RectTransform).sizeDelta = new Vector2(1195f, 303f); //} Set_ScrollView(totallst); } }