Home > Software engineering >  Unity UI TextMeshPro blocks clicks on buttons under it
Unity UI TextMeshPro blocks clicks on buttons under it

Time:02-23

I have a UI prefab with following children hierarchy (top to bottom): -Button with unit image. -Misc color overlays. -TextMeshPro text block - necessary to display status messages on top of the button.

The issue is TextMeshPro prevents clicking on the button (since it's on top of the button).

Is there a setting to resolve this blocking or the only way is to place button on top (at the bottom of hierarchy).

Thank you.

CodePudding user response:

Try and toggle off "Raycast Target" in the settings under the text object (documentation can be found here).

  • Related