Im laying out a new screen, and I am getting a gap between 2 panels. I have a parent panel that has a vertical layout group. It has 2 child panels that each have layout elements controlling height. I can’t figure out how to get rid of the gap between the 2 child elements.
Could you expand the “Padding” sections of these inspectors? These may be related to the problem, too because you have nested vertical/horizontal layouts
If I see this correctly, you use the default textures from Unity. They are the root of your problem because they have a transparent border without any content.
Is there a way to have text size adjust based on screen size?
For example, in the images attached. I like how the text is displayed on the image on the left (iPhone 4 Wide) but when scaled up to the image on the right (iPhone 6 wide) the text is still the same size. I would ideally, like to be able to have the text scale up or down to fit different resolutions
The root UI gameobject Canvas has the script attached to it. It’s named as Canvas Scaler. Choose the option Scale Mode->Scale with Screen Size and adjust the Reference Screen resolution.
As the Text is a part of UGUI, it’s just like other UI objects, Image, Panel, Buttons, and etc etc. Once you have properly configured the Canvas Scaler, it will scale up&down perfectly.
All my mobile game UI, Menu created using the UGUI and I don’t have any issues with scaling. It fits perfectly in all possible resolutions, as I want.
Cool, this definitely works way better. The layouts work 99% of the time. My only issue now is that when i switch to either of the iPad resolutions a certain text field always disappears. Any idea on how to trouble shoot this?
1.Did you deploy it to the actual device? I do use the Unity 5.0.2 and from time to time the texts disappear in the editor for me also, though I don’t change any resolutions. And it comes back when I go to play mode.
2. It also can be the height or width of your text field. Look at Transform property of the text field and try to put higher values.