Unity Issue Tracker - Adding a child VisualElement to a Label breaks the Label's world bounds
Closed
UUM-12864
Adding a child VisualElement to a Label breaks the Label's world bounds
Unity: Text (TextCore)
Feature Request
2023.1.X
2022.2.X
2022.1.X
2021.3.X
This is not supported at the moment but it is on the roadmap.
Reproduction steps:
Open the user's attached project
Enter Play mode and observe Game View
Exit Play mode
Select “UIDocument” GameObject in the Hierarchy
Toggle “Add Child to Label” on
Enter Play mode and observe Game View
Expected result: Red background fills the Label bounds and a child is added to it
Actual result: Red background no longer fills the Label space and conforms to the cyan square child
Reproduced with: 2021.3.8f1, 2022.1.12f1, 2022.2.0b5, 2023.1.0a6
Could not test with: 2020.3.38f1 (because UI Toolkit is a preview package)
Reproducible on: macOS 12.4 (Intel)
Prioritise and Follow this issue
Have a workaround or additional info about this issue?