Created
January 23, 2017 20:07
-
-
Save jcordeiro67/23e00e79e620d852656d2023b46ad307 to your computer and use it in GitHub Desktop.
Alternate Code Adding Fade Transitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| using UnityEngine.UI; | |
| public class UIFadeIn : MonoBehaviour { | |
| public float fadeInDelay; | |
| void Start () { | |
| GetComponent <Image>().CrossFadeAlpha (0, fadeInDelay, true); | |
| } | |
| void Update(){ | |
| if(Time.timeSinceLevelLoad > fadeInDelay){ | |
| gameObject.SetActive (false); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment