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
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
- Red spots appear when Blending Lighting Scenarios using Adaptive Probe Volumes
- [Windows] About Unity Window needs to be opened twice to adapt to resolution
- NullReferenceException and temporary graph corruption after entering playmode if output node connection was changed
- Sprite Renderer with Animation does not reflect Sprite changes in the Scene when switching Mask Interaction
- User is redirected to a non-existing online documentation link when clicking on "?" help button inside Inspector window while Animator Override Controller is selected
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.