Author Topic: FixedSize and Screen Resolutions  (Read 3866 times)

MegaX

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
FixedSize and Screen Resolutions
« on: June 24, 2014, 10:08:53 PM »
Hi,

I have searched around and found no solution to my problem.
So I have my UIRoot set to FixedSize with manual height of 1080. UILabels look nice and crisp in 1080p (native) resolution. However, when I play the game in 1366x768, UILabels become blurry.
How would you go about making UILabels crisp across different resolutions?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: FixedSize and Screen Resolutions
« Reply #1 on: June 25, 2014, 07:21:54 AM »
You're shrinking them. Fixed Size means everything remains the same size relative to the height of the screen. Only PixelPerfect will keep them crisp everywhere.

MegaX

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: FixedSize and Screen Resolutions
« Reply #2 on: June 25, 2014, 10:57:31 PM »
Right. I do want to keep UI elements the same size relative to height.
Is there a way to accomplish both that and keeping the text crisp?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: FixedSize and Screen Resolutions
« Reply #3 on: June 26, 2014, 11:03:00 AM »
That's not physically possible. Shrunk UI = pixels don't align. Can't get it to be crisp this way.

MegaX

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: FixedSize and Screen Resolutions
« Reply #4 on: June 26, 2014, 11:18:59 PM »
I see, thanks for the help.
So in order to achieve pixel-perfect UI for various resolutions, is it a good approach to resize UI elements and change the font size in code based on the chosen resolution?
Or another possibility is to have one atlas for each resolution and switch the atlas to use during runtime based on the resolution, would that work?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: FixedSize and Screen Resolutions
« Reply #5 on: June 27, 2014, 01:02:28 PM »
To achieve pixel perfect UIs at different resolutions you have to use the PixelPerfect setting, or different atlases. For example, HD atlas with pixel size of 1, then a UHD atlas with pixel size of 0.5. You can use HD on non-retina devices, and UHD on retina devices. There are quite a few threads on this topic here.