Exercise 5 Adding A Screen Fader Effect - HTML
Exercise 5 Adding A Screen Fader Effect - HTML
HTML)
APPUS
SHOWCASE
(exercise-5-adding-a-screen-fader-effect.html#)
(../../../APP-SHOWCASE.HTML)
SAMSUNG
DEVELOPERS
(../../../INDEX.HTML)
SIGN UP (../../../SIGN-UP.HTML)
Samsung Developers US (../../../index.html) > Developer Resources (../../../developerresources.html) > Gear VR (../../gear-vr.html) > Apps and Games (../apps-and-games.html) >
Exercise 5: Adding a Screen Fader Effect
Your image viewer app is now fully functional, but youre not quite nished. Next, you
will create a fader object that will display a simple fade transition when you move from
the splash scene to main scene and when you switch between images in the viewer.
In this exercise, you will learn how to:
Add a fade through black transition using a Screen Fader Object
Create a prefab
Build and run the completed app on a Gear VR device
Using the catch up scenes
We recommend that you start this exercise using the Splash and Main scenes you
created in the previous exercises. However, if you wish to start with clean les, you can
use the provided catch up scenes for Exercise 5.
1. Return to Unity and close the Build Settings window.
2. In the Project view, navigate to the /Assets/Workshop/Scenes/CatchUpScenes
6. With the ScreenFader > Sphere_Inv object still selected, navigate to the Inspector
view and change the Scale propertys X, Y, and Z values to 0.01. This will reduce the
size of the sphere so that it only covers the camera.
7. Review the scene in the Game view. Since the sphere is not transparent, you will only
see a gray screen.
8. In the Project view, open the /Assets/Workshop/Materials folder and drag the
ScreenFader material into the Mesh Renderer > Materials > Element 0 eld in the
Inspector view.
9. Preview the screen in Game view. You will be able to see your scene once again. The
ScreenFader material only contains a color (black) with an alpha value set to 0.
10. In the Inspector view, click the Add Component button and select Scripts > Screen
Fader Sphere.
This script controls the duration of the fade effect. By default, it is set to 0.3 seconds for
the fade to black and fade to transparent effects.
11. Click the Add Component button and select Scripts > Anim Shader Alpha.
This script tells the Screen Fader Sphere when to start modifying the alpha value over
a
specied amount of time. In this case, the scene will start the fade to black effect 1
second before transitioning to the Main scene.
Note: The duration of the Screen Fader Sphere scripts Fade to Black property should not
exceed the duration of Anim Shader Alpha script, or the scene will switch before completely
fading to black.
I have read the Privacy Policy (../../../privacy.html) and agree to the Samsung Developer Connection Terms and
Conditions. (exercise-5-adding-a-screen-fader-effect.html#modal-1)
CONNECT
Search
Latest Tweets
@SamsungDevUS (http://twitter.com/SamsungDevUS)
Nuance and Samsung Arm Developers with Innovation and Tools for the Connected
Lifestyle (../../../blog/nuance-samsung-arm-developers-innovation-tools-connectedlifestyle.html)
Develop Samsung Gear and Android Apps with the Tizen IDE for Wearable (../../../blog
/develop-samsung-gear-android-apps-tizen-ide-wearable.html)
Events (../../../events.html)
Blog (../../../blog.html)
Privacy (../../../privacy.html)
Sign Up (../../../sign-up.html)