Exemplo n.º 1
0
 static void SetUpInstance()
 {
     if (instance == null)
     {
         GameObject prefab        = Resources.Load("SceneFader") as GameObject;
         GameObject sceneFaderObj = (GameObject)Instantiate(prefab);
         instance = sceneFaderObj.GetComponent <SceneFader> ();
         instance.Init();
         DontDestroyOnLoad(instance);
     }
 }