How can I delete a line of UI Text?
I am creating autotyping text, and I want to create an array of strings, where every time the text wraps to a new line, it is added to a different section of the string array so I can delete the text line by line when the window gets full. If this is possible, or some other method to achieve this same effect is, I would appreciate and help. Thanks in advance.
string[] text = (INPUTFIELD.text).Split('\n');
string lastLine = text[text.Length - 1];
@nathanthesnooper Would this work with the lines unity automatically wraps when a line is too full to have more words?
No, that wouldn't work in your case. Unity automatically wraps it based on the length. What I would suggest doing is:
Deter$$anonymous$$e length of your text box
Find the last character that fits on that line
Split your string at the space that comes before that character