using UnityEngine; using UnityEngine.UI; using EnhancedUI.EnhancedScroller; namespace EnhancedScrollerDemos.Chat { /// /// This is the view of our cell which handles how the cell looks. /// public class CellView : EnhancedScrollerCellView { /// /// A reference to the UI Text element to display the cell data /// public Text someTextText; /// /// A reference to the rect transform which will be /// updated by the content size fitter /// public RectTransform textRectTransform; /// /// The space around the text label so that we /// aren't up against the edges of the cell /// public RectOffset textBuffer; public void SetData(Data data) { someTextText.text = data.someText; } } }