Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

TextMeshPro TMP_Inputfield auto generated object "Blocker" causing layout issues

Discussion in 'Unity UI & TextMesh Pro' started by FernandoHC, Jun 12, 2018.

  1. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    254
    Hello,

    I'm having a layout issue being created whenever a TMP_Inputfield object is selected to dropdown options, it creates an object called "Blocker" in one of the parents hierarchy.
    I understand this object is created in order to serve as a click-outside feature for the dropdown, which works fine in other places.
    However the auto generated object is behaving in a way if the parent object is part of a UI Layout family, it shapes the "Blocker" object inconsistently, causing other UI objects in the panel to shift places and the blocker to not work as intended (as it would not be clickable due to its size shrinking).
    In order to fix the issue I have to either manually add an UI element and set it to ignore layout, or to disable the layout of the parent object.

    Is there any other way to fix this issue other than manually fixing the issue after it happens? Can't the "Blocker" auto-generated object come with a Layout Element script with Ignore Layout ticked by default?
     
  2. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    254
    Not sure how to mark the thread as solved, but I found a solution that works for me.
    Apparently the Blocker object is looking for the canvas root, so I just had to make a new canvas without any layout and it fixed the issue.

    Still, would be nice if the Blocker object would be a bit more flexible or with settable options.
    Cheers
     
    Stephan_B likes this.