コード例 #1
0
 // Use this for initialization
 void Start()
 {
     if (ObjectPool == null)
     {
         ObjectPool        = gameObject.AddComponent <ScrollObjectPool>();
         ObjectPool.prefab = element;
     }
 }
コード例 #2
0
    //------------------------------------------------------------
    public void Setup(EventCallback _callback, string _mode)
    {
        if (ObjectPool == null)
        {
            ObjectPool        = gameObject.AddComponent <ScrollObjectPool>();
            ObjectPool.prefab = element;
        }

        OnEventCallback = _callback;

        itemList.Clear();

        //add item // 아이템 추가
        //ScrollViewItem item1 = new ScrollViewItem(); item1.uid = 1;
        //itemList.Add(item1);

        //itemList.Sort((a, b) => a.uid.CompareTo(b.uid)); //소트

        RefreshDisplay(); //init
    }