Search Issue Tracker
By Design
Votes
1
Found in
4.6.0b17
Issue ID
655978
Regression
No
Instantiating UI prefab as a child of UI element which has disabled Canvas/does not have Canvas sets Scale to 0
To reproduce this issue:
1. Open 'TestScale' project
2. Open 'scene'
3. Play the scene
4. Press Button 'New Game' which instantiates UI prefab 'Image' on disabled Canvas('Canvas2') and then enables it
5. Notice 'Image(Clone)' ( Canvas2->Add Player) has Scale(x,y,z)=0
6. Now Click New Game again
7. Now it instantiates correctly as Canvas is already enabled
Comments (3)
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
- "Curve" window workspace doesn't update the scale to match the selected curve preset unless reopened
- StackOverflowException occurs and tests fail to load when the Test Runner window is opened while System.Windows.Forms.dll and System.Deployment.dll are present in the project
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
bjlay2000
Nov 07, 2019 14:18
This is still an issue in 2019.2.6f1
deanG
May 18, 2015 18:05
Can confirm this is still present in 4.6.2f1.
We are creating instantiated cards in a scrolling list where the card prefab scale is currently being set to 0 on instantiation. Our workaround is the line after instantiating the prefab we forcibly set its RectTransform scale to 1. This works well but it would be great to have the bug fixed!
johne5
Feb 09, 2015 16:03
The current work around that I use for this is to add a Canvas Group component to the second canvas and in my script I change the alpha from 0 to 1 to enable and disable the second canvas. I hope that is a good work around for you.