Debugger Pick Element Problem

As in the attachment, my mouse is on the button pointed by the red arrow, but in the debugger it showed me the button which is in blue color.

1 Like

Noticed this too. Debugger has always had a weird offset. Probably has to do with screen space coordinates not being translated to GameView/PanelSettings coordinates.

@Digital_Mimesis_Lab Could you file a bug for this in the editor?

I think the conversion does not consider the display scale on top of the game window. Could you check if the picking is aligned when you have a scale of 1x and mention this in the bug report? it could be easy to miss this setting when QA will check this. There is so many scale going on in the editor…

Still broken with scale of 1. Have been broken for as long as I can remember.

I tried with:

  • Screen/editor scaling of 150%

  • Game view scal of 1.3x

  • panel scaling different than 1

  • On Windows

And I am having the proper picking result so far.

I did not test with HI-DPI display or other OS7985349--1025727--pick element.gif

I always had an “offset issue” as well
Something as simple as this is enough to create a small offset issue

<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
    <ui:VisualElement style="flex-grow: 1;" />
    <ui:VisualElement>
        <ui:Button text="Button" display-tooltip-when-elided="true" />
    </ui:VisualElement>
    <ui:VisualElement style="flex-grow: 1;" />
</ui:UXML>

I have a video showcasing the problem. Can I send it to you somewhere?

Add it to a project where you can reproduce the bug and then send a bug report with everything. It will give QA something to start, and I will peek in to get the video :slight_smile:

Other than that, I personally have little experience of sharing video on forums. Sometimes I use screen to gif and hope the gif will be small enough to fit on unity forum. You could possibly try vimeo.

Here is the video. Had to upload it to YouTube as an unlisted video, then link to it. Thumbnail for some reason not showing.
https://www.youtube.com/watch?v=bZPSFXHfnwo

Unity 2021.2.16f

Oh thanks! I was able to reproduce. I opened a bug. Thank you!

1 Like