Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2020.2.0b9
2021.1
Issue ID
1290945
Regression
No
UI Image is not rendered in Prefab Mode when it is created under the GO who has GridLayoutGroup
How to reproduce:
1. Create a new Project
2. Create UI Canvas
3. Create a new GameObject and attach GridLayoutGroup component to it
4. Create a UI image as a child to the new GameObject
5. Drag the UI Image GameObject to the project view to make it prefab
6. Open the newly created Prefab and observe
Expected Behavior: Image is rendered in the prefab mode
Actual Behavior: Image is not rendered
Reproducible with: 2018.4.29f1, 2021.1.0a5
Note:
- Video attached ("FhtPtcKBTo.mp4")
- Other image prefabs are rendered as expected, only those created on GameObject with GridLayoutGroup are affected
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
- Blank, Light-Themed "Create Node" window becomes visible on the next project open
- UI Elements/Layout inconsistencies in the Particle System component
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
- "List is empty" is poorly visible in the "Create Node" window
- [Android] GameObject with a custom shader becomes invisible when deployed with the Vulkan Graphics API
Resolution Note:
As can be seen in the video, the image that is not visible in Prefab Mode has a width and height of 0. The image that is visible has a width and height of 100.
The first image gets a width and height of 0 because it's made into a Prefab at a time while it's being driven. And driven properties in RectTransforms have serialized values of 0. You can set the width and height in Prefab Mode to whatever size you think it should have when it's not driven.