Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to set the overrideSorting propery of Canvas on Dropdown List

Discussion in 'UGUI & TextMesh Pro' started by lgmontoya, Aug 9, 2022.

  1. lgmontoya

    lgmontoya

    Joined:
    Dec 31, 2020
    Posts:
    2
    Hello

    Is there a quick way to set the overrideSorting property on the Canvas of a Dropdown List that is generated by TMP_Dropdown?

    upload_2022-8-9_11-34-26.png upload_2022-8-9_11-34-30.png

    I know I can override CreateDropdownList(GameObject) and have a costum Dropdown List but this seems overkill when I just want to change one property.

    My current problem: I have a dropdown which is part of larger UI. The visibility of the larger UI behaves as expected (appearing and disappearing as events occur) except for the visibility of the Dropdown List which persists if I happen to be in the PROCESS (sorry, had to highlight this) of selecting one of the options in the dropdown list.

    My current workarounds: Register TMP_Dropdown.Hide or TMP_Dropdown.gameObject.SetActive to an event exclusively dedicated to handle this quirk. They work … but I “feel” is not the ideal solution to this.

    Thanks in advance
     

    Attached Files: