I want to make a Scrollable Label in NGUI. Suppose there is list of name of producer, programmer, artiest and other stuff in Label. and there is also scroll bar when i pull up and down. It will show list of contents in Scrollable View. I searched in internet but i did not get idea how access label height and how to put in scroll bar and how to make clipping rectangle.

Any help will be appreciated.

有帮助吗?

解决方案

You should use UIScrollView component. It is used together with UIPanel to provide scrollable, clipped content. Usually it is used also with UIGrid or UITable, to provide functionality of scrolled table.

However in your case you should just create all your Credits content as a child of this UIScrollView. If you want, you can add another GameObject with UIScrollBar to provide scroll bar functionality.

If you take a closer look on imported NGUI package, you will find various Example scenes, where such functionality is used. Also this official tutorial may help: UIScrollView tutorial.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top