Unity Issue Tracker - Fit Canvas doesn’t fit the canvas when Match Game View enabled
Fixed
UUM-27164
Fit Canvas doesn’t fit the canvas when Match Game View enabled
Unity: UI Builder
UI Toolkit
Fixed
2023.2.X
Won't Fix
2023.1.X
2022.2.X
2021.3.X
Verified in PR
The fix was to remove the button and replace it with a Fit Viewport button.
This is a feature so backporting is not currently planned.
The fix was to remove the button and replace it with a Fit Viewport button.
This is a feature so backporting is not currently planned.
The fix was to remove the button and replace it with a Fit Viewport button.
This is a feature so backporting is not currently planned.
Repro:
Import the attached UXML file to an empty project.
Set Game View resolution to Full HD.
Open imported UXML file in UI Builder.
In UI Builder, select the Canvas and ensure ‘Match Game View’ is enabled in the UI Builder inspector.
Click ‘Fit Canvas’ in the inspector.
Expected Outcome: The zoom is adjusted and the canvas is centered so that the full canvas is visible in the viewport. Actual Outcome: The zoom is always set to 100 and the canvas is too large to be viewed in its entirety. Have to manually adjust zoom and readjust positioning to fit the canvas to the viewport.
Attached GIF of this to the ticket.
Tested on Windows 10. Could not find the UI Builder in 1.0.0-preview.18 with 2020.3.41f1 and this reproduces in 2021.3.18f1 so marking as not a regression.
Have not extensively regression tested the issue - please contact the assigned ticket reporter if you need further testing or information.
Prioritise and Follow this issue
Have a workaround or additional info about this issue?