Search Unity

Question Dropdown menu values invisible?

Discussion in 'UGUI & TextMesh Pro' started by TolNinef, Feb 26, 2024.

  1. TolNinef

    TolNinef

    Joined:
    Jan 8, 2024
    Posts:
    2
    Hi all,
    Does anyone know why my dropdown menu item values aren't showing up? They do exist, I can select them and change the dropdown current value. Even after clicking on a "blank" field, the selected field updates to whatever the value is.

    upload_2024-2-26_16-14-58.png

    This is what it looks like. This still happens even after creating a new UI>Dropdown (TMP).
     
  2. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    oh, I remember this, but forgot what the fix was. do you set them in code? I remember I had to enable-disable the text or the game object to refresh them, or change the text manually to empty and back to the real value (which was a TMPro bug at some point, maybe it still is)

    or maybe the item template/prefab itself has a missing text, if you've modified it. is it visible in edit mode? there's a disabled "Template" object that you could inspect.

    also, inspect the texts at runtime and see if they indeed have the text but invisible
     
    TolNinef likes this.
  3. TolNinef

    TolNinef

    Joined:
    Jan 8, 2024
    Posts:
    2
    Found it! Not sure why this works, but thanks to xucian I looked in the template and the template had an image component in the viewport. After disabling it I can now see the text again. Thanks!
     
    xucian likes this.