GUI Scale (Position+Size)

This is really quick, but just a few general questions about GUI:

How do i keep gui the same position and scale? I know there is some discourse between scale and offset but i really don’t know what the use cases are for them.



For example in the images above: square is in a nice shape on wider screen, but as the screen gets smaller the square squishes. How do i fix this?

There are some other examples for example with an object being in the middle of a screen but it squishes based on the screen resolution size

Another!! example: i had this sprint bar thingy in another game, but on some smaller resolutions the sprint button would for some reason move downwards and clip with the toolbar. I really don’t know how to fix any of this

some help would be great! Thanks!

1 Like

Add UIAspectRatioConstraint as a child.
On the video:

  • Frame: has position { 0, 0 }, { 1, 0 }, anchor point { 0, 1 }, size { 0.2, 0 } { 0.2, 0 }
  • UIAspectRatioConstraint has default parameters

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.