ContentView DeleteLastContentView(string content) { Transform lastChildTransform = contentParent.transform.GetChild(contentParent.transform.childCount - 2); ContentView contentView = lastChildTransform.GetComponent <ContentView>(); contentView.DeleteText(content); return(contentView); }