Search Unity

Bug Play button can overlap Grid Snap button

Discussion in 'Editor & General Support' started by JasonC_, May 27, 2021.

  1. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    Platform:

    Unity 2020.9.3f1, Windows 64-bit
    Display resolution 3840 x 2160, system scaling at 250%, editor using default system scaling

    Issue:


    The Play button can overlap the Grid Snap button in the editor if the window is resized to be too small horizontally:

    ezgif.com-gif-maker (7).gif

    See also:


    Additionally, when this happens, the portion of the Play button that overlaps the Grid Snap button becomes unclickable (demonstrated in linked video) -- the Grid Snap button received the click instead.

    Expected Behavior:

    Expected behavior is one of the following:

    - The transport buttons stop before they overlap the left-side buttons, or
    - The editor window's minimum width is set to a larger value that prevents this from happening.

    My personal preference is the former, as I prefer not to increase minimum size limits.
     
  2. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    TIL these forums support YouTube embeds. Neat.
     
    Joe-Censored likes this.
  3. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Good news! It's even in 2021.1.0... yaay!



    And it's got even more overlap with part of the "GLOBAL" button, and all the buttons to the left of it judder around as you resize.
     
    JasonC_ likes this.
  4. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    HauntingDirtyDragon-size_restricted.gif

    Also: @Kurt-Dekker Man, I watched your video. Have you tried resizing it harder? It could work. Those buttons are gonna be sore tomorrow, though. :D
     
    Joe-Censored and Kurt-Dekker like this.
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    "KURT... SMASH!!!" You should see me when I'm debugging... brutal!!

    I just want to know how reasonable UI metric anchor calculations happen such that moving the RIGHT edge of an outer rect causes inner rects anchored to the LEFT side to transiently wobble laterally.

    HOW!??! SHOW ME YOUR CODE!

    The only legitimate explanation I can come up with is that the slightly-crushed version is actually the operating system taking the existing screen surface as a bitmap and mindlessly smooshing it laterally, which is visible for a moment before the WM_PAINT (or whatever it's called on Mac) triggers.
     
  6. They solved it in 2021.2... no more toolbar next to the play button so no more overlap! :D

    screenshot1.png
     
    JasonC_ likes this.