IEnumerator Typepage(PageClass P) { writespeed = 0.1f; Basetext = P.ContentTitle; Choppedtext = Basetext; Outputtext = ""; UIManager.uiManager.DialogueTitle.text = Outputtext; UIManager.uiManager.Dialoguebox.text = Outputtext; UIManager.uiManager.Action.text = Outputtext; foreach (Transform item in UIManager.uiManager.OptionHolder) { Destroy(item.gameObject); } while (Choppedtext.Length > 0) { Outputtext += NextChar(); UIManager.uiManager.DialogueTitle.text = Outputtext; yield return(new WaitForSeconds(writespeed)); } Basetext = P.Content; Choppedtext = Basetext; Outputtext = ""; while (Choppedtext.Length > 0) { Outputtext += NextChar(); UIManager.uiManager.Dialoguebox.text = Outputtext; yield return(new WaitForSeconds(writespeed)); } for (int i = 0; i < P.Options.Count; i++) { if (EngineScript.engineScript.Archivecheck(P.Options[i])) { GameObject Button = Instantiate(Optionprefab); buttonscript OC = Button.GetComponent <buttonscript>(); OptionClass OCG = EngineScript.engineScript.Ocgen(P.Options[i]); OC.setup(OCG); Button.transform.SetParent(UIManager.uiManager.OptionHolder); yield return(new WaitForSeconds(0.5f)); } } Basetext = P.CallToAction; Choppedtext = Basetext; Outputtext = ""; while (Choppedtext.Length > 0) { Outputtext += NextChar(); UIManager.uiManager.Action.text = Outputtext; yield return(new WaitForSeconds(writespeed)); } updating = false; }