Creating a swipe transition with the Animation View
In this recipe, we will create a bit more creative transition effect. A lot of the steps are similar to the previous recipe, but the final result is completely different. This recipe's goal is to encourage you to experiment with animating different UI properties to achieve interesting effects.
Getting ready
Similar to the previous recipe, we will create everything from scratch in Unity; you don't have to prepare anything beforehand. You can open the provided example Unity project and go to the Chapter 03 2D and user interface animation\Recipe 06 Creating a swipe transition with the animation view directory. You will find an Example.unity scene there. Play the game and press space bar to see the swipe transition effect.
How to do it...
To create a swipe transition effect, follow these steps:
- Open a scene.
- Create an
Imagein theHierarchy. To do so, go toGame Object|UI|Imagemenu on the top of the screen. ImageandCanvasgame objects will...