Example #1
0
 void Awake()
 {
     creator = FindObjectOfType <TPFaderCreator>();
     if (Fade == null)
     {
         Fade = () => creator.Fade(FadeToScene, FadeType);
     }
 }
Example #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
         return;
     }
     DontDestroyOnLoad(gameObject);
     Refresh();
 }