To create a swipe transition effect, follow these steps:
- Open a scene.
- Create an Image in the Hierarchy. To do so, go to Game Object | UI | Image menu on the top of the screen.
- Image and Canvas game objects will be created in the Hierarchy.
- Select the Image game object and set its name to BlackScreen.
- Right-click on the Canvas game object and choose Create Empty to create an empty game object.
- Set the name of the newly created game object to FadeAnimator. This object will animate the effect.
- Set the Anchor Preset of the BlackScreen and FadeAnimator game objects to stretch in both X and Y coordinates the same way as we did in the previous recipe.
- Select the Canvas game object and add a Canvas Scaler component to it. We will ...