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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
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.