Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question TextMeshProUGUI.text.length but for visible characters only?

Discussion in 'UGUI & TextMesh Pro' started by MAWMatt, Oct 12, 2022.

  1. MAWMatt

    MAWMatt

    Joined:
    Nov 10, 2016
    Posts:
    58
    Hey folks,

    The title is terribly written but conveys exactly what I'm asking about. Is there a way for me to get the length of text, in terms of characters, that excludes all of the rich text parses? I'm animating maxVisibleCharacters of a small paragraph. The animation starts at 0 and goes until it reaches the textObject.text.length, but that value is much greater than the actual visible characters, making my audio loop stop far off.

    Thanks!
    -Matt
     
  2. MAWMatt

    MAWMatt

    Joined:
    Nov 10, 2016
    Posts:
    58
    I guess not.