Search Issue Tracker

Fixed

Fixed in 2023.2.18f1, 6000.0.0b11

Votes

0

Found in

2021.3.31f1

2022.3.11f1

2023.1.16f1

2023.2.0b11

2023.3.0a7

6000.0.0b11

Issue ID

UUM-51239

Regression

No

VisualElement's Bounding Box height doubles if VE's height becomes less than min-height

--

-

2023-10-02: This ticket was originally about the Cameras overlay's height doubling when docked into the bottom left or top left dropzones in the Scene view. However, deeper investigation has revealed that this is a generic VisualElement bug not and specific to Overlays. 

Under certain conditions, the VisualElement's bounding box height will be double the value of the min-height if the VisualElement's height is less than the min-height.

 

Please watch the attached "{*}visual-elements-height-bug.mp4{*}" video

 

How to reproduce:
# Add the attached custom window script ({*}HeightBugWindow.cs{*}) to an empty project. The custom window simply contains one parent VisualElement with auto width and height and Stretch align-items. The parent VE contains a child VE which has a specified min-height and height.
# Open the window. It should look normal with the parent VE's height automatically matching the height of the child VE.
# Open the UITK debugger and find the child VE. Manually adjust it's height to be less than the provided min-height (180). Observe the height of the child VE. 

Actual result: The VisualElement's suddenly becomes twice as tall as the min-height. 

Expected result: The VisualElement's height stays clamped to min-height or is allowed to become less than min-height without causing strange behaviours like doubling in height.

 

2023-10-02: the following original repro step does not work every time. It will only work sometimes when resizing the Cameras overlay to the minimum size because sometimes the resize will cause the actual height to become something like 179.99999f (which is saved as 179.99999f but shows up as 180 in the UITK debugger) which is less than the min-height 180. This causes this VisualElement's bounding box height to double.

-How to reproduce:-
-1. Open any project-
-2. In Scene View Overlay Menu (`) enable the Camera Overlay-
-3. Dock the menu to the left bottom corner of Scene View-
-4. Observe the Camera Overlay-

-Actual result: The Camera Preview is cut in half or the container changes shape-
-Expected result: The Camera Preview is whole when docked and the container of the Preview does not change shape-

-Reproducible with: 2023.2.0a23, 2023.2.0b11, 2023.3.0a6-
-Not reproducible with: 2021.3.29f1, 2022.2.21f1, 2023.1.14f1, 2023.2.0a22-

 

-Reproduced on: Windows 11-

-Note: A similar issue occurs if you dock it in the top left corner, the Menu expands-

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.