2
\$\begingroup\$

I am very confused about Unity's UI system.

This is how my inventory menu looks in the Editor:

In Editor

And this is the view in game:

In Game

Settings

Settings

Can someone please explain why this happens?

\$\endgroup\$
2
\$\begingroup\$

I finally solved it, I had to change the rect transform of Panel_Slots to stretch height:

enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ Most Unity UI layout problems are caused by designing in one resolution and playing in another. When I design UIs in Unity I usually do that by detaching the scene window and constantly changing its size around after every change. That way I notice quite quickly if some part of the layout doesn't respond to different resolutions. \$\endgroup\$ – Philipp Nov 6 '17 at 9:15
  • \$\begingroup\$ I think the answer to all problems is simply to use stretch everytime. \$\endgroup\$ – Black Nov 6 '17 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.