Let's now create some welcome text that scrolls horizontally like this:
In order to achieve this, we will need clipping, which consists of displaying only a specific area of a panel. It can be set up using the Clipping
parameter of UIPanel
.
We'll be working on the main menu again, so let's show it in the editor: disable our UI Root
| Options
GameObject, and enable our UI Root
| Options
GameObject.
Before we configure the panel's clipping, we must create the welcome text box.
Let's use our main menu's background as the base for this new welcome textbox:
Select our
Main
|Background
GameObject and duplicate it with Ctrl + D.Rename this new child to
Welcome
.Drag our new
Welcome
GameObject inside theUI Root
GameObject.Change its Transform position to {0, 500, 0}.
For its attached
UISprite
component:Change Sprite to the Window sprite
Change Size to 800 x 100
Set Depth to 1
Select the
Welcome
|Stripes
GameObject and delete it.Select our
Welcome
|Border
GameObject, and for its...