// Start is called before the first frame update void Start() { scrollParent = scrollList.GetComponent <ScrollRect>(); Debug.Log("Scroll parent null? " + scrollParent == null); text = GetComponentInChildren <Text>(); text.text = swapIndex.ToString(); }