Examples
The main point in this chapter is providing examples of how to create common UI animations and effects, so let's get to it.
Animating pop up windows to fade in and out
With our first example, we will continue to work on our main scene. Duplicate the Chapter7
scene to create a new scene named Chapter8
. Open the Chapter8
scene and complete this example within it.
Currently, we have a Pause Panel
and Inventory Panel
that instantly appear when the P or I key is pressed. That's not terribly interesting, so let's add some animations to have the panels pop in and out with fade and scale animations.
Note
It can get rather tedious having to expand all of the parents to see their children every time you go to a new scene. A shortcut to open all parents is to select everything in the Hierarchy and then press the right arrow key on the keyboard. You can do this multiple times if you have multiple nestings. The left arrow key will collapse the parents.
Our workflow to set up these animations and their...