Search Unity

Bug Textmeshpro broken on long text

Discussion in 'Visual Scripting' started by TimHermelink, Jan 19, 2023.

  1. TimHermelink

    TimHermelink

    Joined:
    Jan 20, 2022
    Posts:
    14
    So basically im creating a learning app, and i added a feature to import a list from quizlet.
    It seems to work fine, but the textmeshpro just won't display it!
    But, if i use a non-imported list (a list created in the app itself) it does work!
    WhatsApp Image 2023-01-19 at 16.33.34.jpeg
    (part where text needs to be)
    Is there like a limit for displaying characters in textmeshpro?

    EDIT: Basically if i change the varible the textmeshpro is connected to, it does work?
     

    Attached Files:

    Last edited: Jan 19, 2023
  2. FN10

    FN10

    Joined:
    Jan 6, 2023
    Posts:
    5
    Have you changed the font size? Because it might be too big to fit in that space.
     
  3. TimHermelink

    TimHermelink

    Joined:
    Jan 20, 2022
    Posts:
    14
    No, its not too big or too small, it can't set the text from the varible.
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,063
    Does the text show up if you enter it manually in TextMeshPro component?

    To me, it also seems like text might be too large to fit the text box. Alternatively, you might be referencing a different TextMeshProUGUI object or the variable at some point provides an empty string or null value.
     
  5. TimHermelink

    TimHermelink

    Joined:
    Jan 20, 2022
    Posts:
    14
    No it doesn't show the text when i change it in play mode, but changing the varible manually does work.
    So its a bug in the varible.
     
  6. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,063
    Are you sure that variable is not set in some other graph?
    It's highly unlikely to be a bug. Which version of Unity, UVS and TextMeshPro are you on?

    And does this issue reproduce in a new empty scene with just a text object in it?
     
  7. TimHermelink

    TimHermelink

    Joined:
    Jan 20, 2022
    Posts:
    14
    I resolved it :), my script for generating a list was going WAY to fast.
    So, i added a delay and it worked!