Implementing UI Scroll View
The UI Scroll View object creates a scrollable area along with two child UI Scrollbars. The scrollable area can be scrolled using the scrollbars, by dragging the area within the Scroll View, or using the scroll wheel on the mouse.
To create a UI Scroll View, select + | UI | Scroll View. By default, a UI Scroll View has three children: Viewport
, Scrollbar Horizontal
, and Scrollbar Vertical
. The Viewport
object also has a child named Content
. The Scrollbar Horizontal
and Scrollbar Vertical
children have the same parent/child relationship as default UI Scrollbars, as discussed in the previous section.
Even though the UI Scroll View comes with two Scrollbar
children by default, you don’t have to use both Scrollbars with your Scroll View
. In fact, you don’t have to use Scrollbars at all! Refer to the Scroll Rect component section for further details.
The Viewport
child object is a UI Image with a Mask component. The Mask component of Viewport...