// Update is called once per frame void Update() { if (Input.GetKeyDown(startKey) && currentTextBox == null) { currentTextBox = Instantiate(textBoxPrefab, canvas.transform).GetComponent <TextBoxController>(); currentTextBox.Enqueue(dialogue); } }