void Update() { if (!acceptInput) { return; } foreach (var c in Input.inputString) { if (c == '\b') { if (enteredText.Length > 0) { enteredText = enteredText.Substring(0, enteredText.Length - 1); } } else if (c == '\n' || c == '\r') { if (enteredText.Length > 0) { StartCoroutine(ExplodeText()); } } else if (c == '<' || c == '>') { // do nothing } else { enteredText += c; } FlyingText.UpdateObject(textObject, enteredText + cursorChar); } }
void BlinkCursor() { if (cursorChar == '-') { cursorChar = ' '; } else { cursorChar = '-'; } FlyingText.UpdateObject(textObject, enteredText + cursorChar); }