UI Toolkit's Buttons don't fully expand when placed inside ToggleButtonGroup
Unity: UI Toolkit Controls
Fixed
2023.3.X
Won't Fix
6.0.X
2023.2.X
Updated the inspector toggle button group class styling.
Closing the backport for this version as support for the ToggleButtonGroup property field was introduced in a newer version of the editor.
Reproduction steps:
1. Open the attached “Tanks_Complete.zip” project
2. Open the “MainDemo” Scene
3. Select the “PlayManager” GameObject in the Hierarchy
4. Unravel the “Full Inspector” property in the Inspector’s “Play Manager (Script)” Component
5. Observe the buttons inside the “Game State” property
Expected Result: The “Game State” enum’s property drawer results in buttons that expand to the full width on the right of the label
Actual Result: The “Game State” enum's property drawer results in narrow buttons
Reproducible with: 2023.2.9f1, 2023.3.0b6
Couldn’t test with: 2021.3.34f1, 2022.3.19f1 (Unfixable compiler errors associated with UI Toolkit)
Reproducible on: Windows 11
Not reproducible on: no other environment tested
Note:
Looking at the buttons' styles, their width is fixed to 12.25%
Prioritise and Follow this issue
Have a workaround or additional info about this issue?