void Start() { GetComponent <ScrollRect>().inertia = inertia; if (RefreshIconCallback == null) { RefreshIconCallback = func; } if (_movement == Arrangement.Vertical) { viewCount = Mathf.FloorToInt(this.GetComponent <RectTransform>().rect.height / cellHeight) + 2; } else { viewCount = Mathf.FloorToInt(this.GetComponent <RectTransform>().rect.width / cellWidth) + 2; } if (test) { DataCount = 30; } else { DataCount = _dataCount; } OnValueChange(Vector2.zero); RefMax = _itemList.Count; //continue.Start(); //StartCoroutine(ShowItems()); //maxViewCount = maxPerLine * viewCount; //ShowItems(); }
// Use this for initialization void Start() { rect = transform.GetComponent <ScrollRect>(); if (RefreshCallback == null) { RefreshCallback = func; } }
private void OnDestroy() { RefreshIconCallback = null; }