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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
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.