Search Unity

TextMeshPro TMP_Inputfield auto generated object "Blocker" causing layout issues

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

  1. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    338
    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:
    338
    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.