Search Unity

Question Block clicks over UI (uxml)

Discussion in 'Input System' started by Max-0, May 18, 2023.

  1. Max-0

    Max-0

    Joined:
    Jun 10, 2021
    Posts:
    31
    How can I block clicks over a UI Document?
    I want to detect when I click on a gameobject, but not if UI is covering the place I clicked.
    Is there a simple function to do this, or do I have to iterate over every active UI Document?
     
  2. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,859
  3. Max-0

    Max-0

    Joined:
    Jun 10, 2021
    Posts:
    31
    I've tried using Picking Mode.. But I think it's only for UI, not gameobjects behind it?