I have some UI elements whose sizes are driven by Content Size Fitters. These objects are hidden (disabled) within the scene but revealed (enabled) by script when I start the game. (The following bug does not occur if the objects are enabled within the scene before I start the game.)
These UI elements appear to be invisible, even though they are shown as enabled within the hierarchy and inspector. The issue seems to be that the Content Size Fitter is not driving their sizes (the “Some values driven by Content Size Fitter” label is missing from the Rect Transform component in the inspector), so their widths and heights are 0 (hence, they are “invisible”).
However, I can “force” the Content Size Fitters to drive their sizes by doing one (or some combination) of the following while the game is running:
- changing the aspect ratio of the game view
- minimizing/maximizing the game view
- pausing/unpausing the game
I don’t know why these actions are causing the Content Size Fitters to take effect, but this seems like a bug to me. Anyone else experienced this? I first encountered in 4.6.0 b3 and it seems to still be in all the versions since.
