DemoScrollText WidgetΒΆ
The DemoScrollText prefab provides a widget that can hold scrolling text.
A ScrollText widget is composed of a number of prefab children that you can alter to change the apperance of the widget:
- Border – the border of the widget is defined by the Scroller-thin-stroke child.
- Text – the text content and properties are defined by the Text child within the ScrollView object.
The y coordinate of the ContainerTopBound and ContainerBottomBound objects control where the text is positioned. These objects should be positioned at the top and bottom of the text display area. Likewise, the y value of the ContentTopBound and ContentBottomBound objects define the size of the scrolling content. The y value of the top bound should be set to one-half the value of the Text object height property. The y value of the bottom bound should be set to negative one-half of the height property. If you update the text dynamically, you must reset the y property of the content bounds objects.