Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2021.2.X, 2022.1.X
Votes
1
Found in
2020.3
2021.1
2021.1.5f1
2021.2
Issue ID
1336574
Regression
No
[UI Builder] Setting Element's Margins to auto in a newly created file completely shrinks the Element and breaks the Inspector
How to reproduce:
1. Create a new project
2. Click Window -> UI Toolkit -> UI Builder
3. In the Hierarchy, add a new Label
4. Set the Left Margin to "auto"
5. Save the UI file
Expected results: After the file is saved, the UI layout does not change and the Inspector window is functional
Actual results: The Laber is shrunk, Inspector window becomes blank when the Label is selected
Reproducible with: 2020.3.12f1(1.0.0-preview.14), 2021.1.12f1, 2021.1.0b1
Could not test with: 2018.4.35f1, 2019.4.28f1(UI Builder was not yet available)
Workaround - Saving the file before setting the Margins to Auto seems to prevent the issue
Notes:
1. 2021.1 and 2021.2 streams were tested using the built-in package versions
2. The issue seems to only occur when the "auto" option is used. "px", "%" and "initial" didn't cause the issue
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- A script cannot be attached to a GameObject when there is another script that is generic with the same name in a different folder
- Scene View drop-down fields reopen when clicking them again to close it
- Crash on UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline when opening a specific project
- [STW 6.1] UI Builder Inspector fields get corrupted when docked UI Builder is maximized
- Pickers and ‘+'/’-' buttons are not visible on the right side of parameter fields when the width of the "Project Settings... -> Quality" window is small
Resolution Note (fix version 2022.2):
Fixed in Unity 2022.2.0a4
Resolution Note (fix version 2022.1):
Fixed in - 2022.1.0b10
Resolution Note (fix version 2021.2):
Fixed in - 2021.2.13f1