Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to debug what I clicked on UI?

Discussion in 'Scripting' started by tomang5, Oct 25, 2020.

  1. tomang5

    tomang5

    Joined:
    Feb 18, 2020
    Posts:
    63
    Hi all,

    Is there a way to see what UI element I click on the editor? Sometimes I come across a problem that I cannot click a button or something. After looking every single UI elements that can be the problem, I find them; but I wonder if there's a way to see the name of the UI element I click. Do I have write my own debug code for this, or is there a built-in feature?
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,725
    The EventSystem component has a preview window that displays all kinds of info that might help you here: