I have my text aligned to the center-middle, which is why I i use the visibility of the characters instead of appending letter by letter to the text. My problem now is, that once the second line starts, the first line moves slightly up and I do not understand why.
private IEnumerator AnimateTypingEffect()
{
descriptionText.maxVisibleCharacters = 0;
// Gradually reveal the characters
for (int i = 0; i <= descriptionText.text.Length; i++)
{
descriptionText.maxVisibleCharacters = i;
yield return new WaitForSeconds(textSpeed);
}
}
The text is already there, every position of the words is clear and the writing occurs from left to right despite my alignment, which is how i want it to be.I just do not want the line to move but rather be static, and no i can not set the alignment to top or bottom, because the descriptionText is variable, so sometimtes it only has 1 line and sometimes 2 or 3, but I still want it to be always in the center of the screen. Can someone help me out with that?