Search Unity

TMPro Dropdown doesn't react when clicking on it

Discussion in 'UGUI & TextMesh Pro' started by CaringKarol, Aug 16, 2019.

  1. CaringKarol

    CaringKarol

    Joined:
    Jan 22, 2018
    Posts:
    28
    In my unity project, I have a TMPro dropdown ui element that doesn't react when I click on it. I have an event system and every other ui element (buttons, panels, and sliders) works. Could anyone help me fix this issue?
     
  2. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    Do you have Raycast target disabled on it or Interactable disabled?

    The Drop Down could also be affected by the similar setting on its parent / other objects in the same hierarchy.
     
  3. CaringKarol

    CaringKarol

    Joined:
    Jan 22, 2018
    Posts:
    28
    Interactable is enabled and I’m note sure where the Raycast target is at so I’ll say that it’s its default setting.
     
  4. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    The Raycast Target is on the Image component.

    Have you tried to create a new scene and adding a TMP DropDown to see if the behavior is the same?

    What version of Unity and TMP package are you using?
     
  5. CaringKarol

    CaringKarol

    Joined:
    Jan 22, 2018
    Posts:
    28
    It works when I do it on another scene. My version of unity is 2019.2.0f1 and version of TMPro is 2.0.0.
     
  6. Stephan_B

    Stephan_B

    Joined:
    Feb 26, 2017
    Posts:
    6,595
    So something in your scene hierarchy is causing the behavior. I would suggest carefully reviewing each parent object to see what setting they have that could be the cause. Might need to remove / reconstruct that setup one object at a time to see when the issue shows up.

    Also, I would suggest updating to version 2.0.1 but that should not have any impact on this.
     
  7. CaringKarol

    CaringKarol

    Joined:
    Jan 22, 2018
    Posts:
    28
    Okay I will try that, thank you
     
  8. bishwa5

    bishwa5

    Joined:
    Apr 25, 2023
    Posts:
    1
    You can also Create a new Canvas and copy all the elements into the new canvas and delete the old one. This worked for me
     
    Unifikation likes this.
  9. Unifikation

    Unifikation

    Joined:
    Jan 4, 2023
    Posts:
    1,086
    Neat trick! I've done this with particle systems that generate NaN errors and AABB errors by the thousands, but hadn't thought to do it for Canvases. THANK YOU!!!