Reader small image

You're reading from  Unity 5.x Animation Cookbook

Product typeBook
Published inMay 2016
Reading LevelExpert
PublisherPackt
ISBN-139781785883910
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Maciej Szczesnik
Maciej Szczesnik
author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik

Right arrow

Creating a fade out - fade in transition with the Animation View


Every game has some sort of fade in/fade out transitions: between the levels, or when you enter a dialog or a cutscene, and so on. In Unity, we can create such transitions very easily using the Animation View.

Getting ready

You don't have to prepare anything for this recipe; everything is created in Unity from scratch. You can open the provided example Unity project and go to the Chapter 03 2D and user interface animation\Recipe 05 Creating a fade out - fade in transition with the animation view directory. You will find an Example.unity scene there. Play the game and press the space bar to see the fade in/fade out effect.

How to do it...

To create a fade in/fade out effect, follow these steps:

  1. Open a scene.
  2. Create an Image in the Hierarchy. To do so, go to Game ObjectUIImage menu on the top of the screen.
  3. Image and Canvas game objects will be created in the Hierarchy.
  4. Select the Image game object and set its name to BlackScreen...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Unity 5.x Animation Cookbook
Published in: May 2016Publisher: PacktISBN-13: 9781785883910

Author (1)

author image
Maciej Szczesnik

Not interested. Too busy with current game project. Source: Linkedin.
Read more about Maciej Szczesnik