void Awake()
 {
     persistantObject = GameObject.Find("PersistantGameObject");
     //load persistantObjectScript attached to persistantObject
     script         = persistantObject.GetComponent <PersistObjectScript>();
     finalText.text = script.Data;
 }
Esempio n. 2
0
 public void LoadFinalScene(string text)
 {
     //load persistantObjectScript attached to persistantObject
     persistantGameObject = GameObject.Find("PersistantGameObject");
     script      = persistantGameObject.GetComponent <PersistObjectScript>();
     script.Data = text;
     SceneManager.LoadScene("Koniec");
 }