Accumulate Text MaxLines Not Working
Posted: Sat Nov 04, 2023 1:07 am
So I set maxLines to 35 on the panel and noticed a slowdown eventually. Then I set it to 4 and noticed it was putting in way more lines than 4. I can see that it's cutting off text, but it doesn't seem to be listening to the maxLines that I set.
So I started watching previousText.Length while clicking through dialogue and noticed it just keeps getting bigger and bigger the entire time. Sometimes a little smaller, but always trending towards bigger.
I tried to make sure there are no scripts overriding this.
What am I missing or what might I check? This is in version 2.2.38.2
So I started watching previousText.Length while clicking through dialogue and noticed it just keeps getting bigger and bigger the entire time. Sometimes a little smaller, but always trending towards bigger.
Code: Select all
if (accumulateText && !string.IsNullOrEmpty(subtitle.formattedText.text))
{
if (numAccumulatedLines < maxLines)
{
numAccumulatedLines++;
}
else
{
// If we're at the max number of lines, remove the first line from the accumulated text:
previousText = previousText.Substring(previousText.IndexOf("\n") + 1);
Debug.LogWarning("Previous Text Length: " + previousText.Length);
}
}
I tried to make sure there are no scripts overriding this.
What am I missing or what might I check? This is in version 2.2.38.2