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
- Usage of Adaptive Probe Volumes throws a lot of IndexOutOfRangeException and Assertion Failed errors
- Prefab overrides don't recover missing managed references
- Trail Renderer visual doesn't match the positions of vertices when they have been offset
- [Mobile] The Material is not visible when using the Decal Renderer Feature
- Uncaught TypeError: Cannot read properties of undefined is thrown when the tab is inactive for several minutes
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.