Search Issue Tracker
By Design
Votes
2
Found in
2018.4
2019.3.3f1
2020.2
Issue ID
1223878
Regression
No
The values of Width and Height properties in Rect Transform differs when Preferred Size is set in the Content Size Fitter
The values of Width and Height properties in Rect Transform are different in the Scene View and in the Prefab Mode when the Preferred Size is set in the Content Size Fitter component
How to reproduce:
1. Open the project "case_1223878-ContentSizeFitter"
2. Open the Scene "SampleScene"
3. Select the GameObject "Image" in the Hierarchy
4. Observe the values of Width and Height properties in the Rect Transform component in the Inspector
5. Press the Open button in the Inspector to open the Prefab
6. Observe the values of Width and Height properties in the Rect Transform component in the Inspector
Expected results: the values of Width and Height properties in the Rect Transform component are different in the Prefab Mode and in the Scene view
Actual results: the values of Width and Height properties in the Rect Transform component are the same in the Prefab Mode and in the Scene view
Reproducible with: 2018.4.18f1, 2019.3.3f1, 2020.1.0a25, 2020.2.0a1
Could not test with: 2017.4.37f1 because the Prefab Mode is not available
Notes:
1. It is reproducible only when the GameObject "Image" has the Content Size Fitter component where Horizontal Fit and Vertical Fit are set to Preferred Size
2. It is not reproducible when the GameObejct "Canvas" has the Canvas Scaler component where Reference Pixels Per Unit is set to 100
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
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Resolution Note (2020.1.9f1):
When opening the prefab mode there is a default canvas element that is created for UI elements. This is created with default values. If the user has changed the defaults on their canvas they can override the default UI scene used for prefab mode. This would be required in this case as they system is doing what its suppose to based on the data it has.