Finishing our splash screen
Open the scene created in the last chapter that functioned as our splash screen, SplashScreen.unity
. Currently, this screen simply displays for 1 second and starts playing the music. Let's get a little fancier and add a logo to the scene. Usually I use this screen to show my company's logo zooming in for 3 seconds.
For this example, I am going to just have the Packt Publishing logo display for 3 seconds. Add the following packt.png
image to the Assets/Sprites/UI
folder:
Now change the Background color of the Main Camera
to white.
Drag the packt.png
image to your scene and set its Transform Position to 0,0,0
.
Right now, if we were to play the game, the image would show for 1 second and then the Town
scene would open. We want this to transition to the StartScreen
after 3 seconds. So, select the Main Camera
, and change the settings on the SplashScreen
script as follows:
We have not yet added the StartScreen
to our build settings, so do so now; otherwise...