Author Topic: Highlighting and clicking stops working when I add an EventSystem  (Read 103 times)

charbela

  • Newbie
  • *
  • Posts: 2
    • View Profile
Unity 2021.1.7f1, latest TGS version

After adding an EventSystem to my scene highlighting (and click events) on cells no longer work, or works for a second and then stops when I click anything.
If I disable the event system (even at runtime) everything works again.

Is it a known issue? I can provide repro if needed

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7097
    • View Profile
Do you have the "Respect Other UI" enabled? When using Canvas UI elements, TGS will detect if the pointer if above any UI element (like a button or panel that blocks raycasts) and will ignore any click (this is to prevent clicking through buttons for example).
If you add an EventSystem to Demo03_CellsVisibility you shouldn't have that issue. Can you try it?

charbela

  • Newbie
  • *
  • Posts: 2
    • View Profile
Do you have the "Respect Other UI" enabled? When using Canvas UI elements, TGS will detect if the pointer if above any UI element (like a button or panel that blocks raycasts) and will ignore any click (this is to prevent clicking through buttons for example).
If you add an EventSystem to Demo03_CellsVisibility you shouldn't have that issue. Can you try it?

That was it, I just had to disable Respect Other UI and it worked. What puzzles me is, the button I added wasn't over the map. Could be because my canvas is a screen overlay? In all cases it's resolved now, thanks!

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7097
    • View Profile
A simple canvas overlay won't block the interaction. Probably you have some panel or other UI element (perhaps transparent) under the canvas occluding the grid that has the "Raycast Target" property enabled.