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