// Update is called once per frame void Update() { if (target != null && Input.GetMouseButtonDown(0)) { gameObject.GetComponentInParent <Movement>().enabled = false; Viewer.Run(target.FullPath, TurnOn); enabled = false; } }
public void FinishEdit() { string path = input.text; if (!File.Exists(path)) { string msg = String.Format("File Path: {0} does not exist. Make sure this path leads to a tome file" + "\n A path looks like: C:\\some\\folders\\add\\stuff\\text.file", path); Text errorConsole = errorBox.GetComponentInChildren <Text>(); errorConsole.text = msg; } else { DialogueViewer viewer = tomeRunner.GetComponent <DialogueViewer>(); viewer.Run(path); gameObject.SetActive(false); } }