コード例 #1
0
 void Awake()
 {
     persistantObject = GameObject.Find("PersistantGameObject");
     //load persistantObjectScript attached to persistantObject
     script         = persistantObject.GetComponent <PersistObjectScript>();
     finalText.text = script.Data;
 }
コード例 #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");
 }