Author Topic: strange issue with high resolution devices!  (Read 14084 times)

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
strange issue with high resolution devices!
« on: January 05, 2013, 06:15:55 AM »
i have complaints from people using high resolution devices that the gui is cut off.
devices are new nexus 10 and new asus tablet both over 1920x1600.

the stuff on the right side is cutoff. it uses anchor right.
the stuff on the left is fine, it uses anchor top left.

it works very well on devices from 800,1000 and 1280 widths. how to adress this issue?
thank you very much!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: strange issue with high resolution devices!
« Reply #1 on: January 05, 2013, 07:20:37 AM »
If you anchored it via a right-aligned anchor, then it should be exactly the same as the left-aligned one. Automatic UIRoot or manual? If manual, what's the "min height" set to?

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: strange issue with high resolution devices!
« Reply #2 on: January 05, 2013, 07:58:25 AM »
UIRoot is set to automatic.
The setup is such that it's anchored right, but since i use draggable panel i have a script that fixes clipping from top to bottom. i dont know if that is causing trouble (it is vertical draggable panel but gui is cut off horizontally)

It's strange, it happens only on high resolutions devices, mostly newer ones.

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: strange issue with high resolution devices!
« Reply #3 on: January 06, 2013, 05:24:25 AM »
Hi!

Few users reported that it happens on new ipad which also has high resolution, can you point me in the right direction regarding this issue, what to investigate?

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: strange issue with high resolution devices!
« Reply #4 on: January 06, 2013, 06:00:46 AM »
i tried with as higher resolution available on my desktop in editor (1920 width) and it worked fine. I dont know why users with androids and new ipad with higher resolution report this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: strange issue with high resolution devices!
« Reply #5 on: January 06, 2013, 09:43:01 AM »
You might want to increase the max height on the UIRoot. If it's set to 1080 for example, then it means that after 1920x1080 the UI will no longer be "automatic" but will actually be manually scaled with a height of 1080.

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: strange issue with high resolution devices!
« Reply #6 on: January 08, 2013, 05:29:14 PM »
Hi!

At first i did not know what is max height, then i realized i have to update gui to the latest version. simple importing from assets store worked, but it broke some other functionality (i have to investigate this further).

Also later i discovered that when i start a new project, and create new UI with NGUI on UIRoot i see new options, one of them is Max Height. Updating to the new version in the old projects did not reveal this new option, so i was wondering what you were talking about. can you confirm that this is not updated properly? since UIRoot does not reveal new options. Creating new UI in the old project does not reveal new options in the UIRoot

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: strange issue with high resolution devices!
« Reply #7 on: January 08, 2013, 08:37:44 PM »
Be sure to follow the upgrade instructions in the readme file that involve deleting the NGUI folder from within a new scene prior to importing the updated package.

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Re: strange issue with high resolution devices!
« Reply #8 on: January 09, 2013, 07:56:44 AM »
everything ok, thanks, i hope it will work now.

warrenbaltz

  • Guest
Re: strange issue with high resolution devices!
« Reply #9 on: April 29, 2013, 07:43:28 PM »
I am seeing the exact same issue. I just upgraded to the latest version (2.5.1 at the time of this post) using the upgrade instructions. I set the maximum height to 1920, which matches my test device. But I am still seeing the same problems.

One example of the problem sets text width based on screen width.
label.lineWidth = (int)(Screen.width*0.9f);

This works on all lower screen resolutions but cuts off on hi-res devices, just as the original post.

Did you ever find a solution or work around?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: strange issue with high resolution devices!
« Reply #10 on: April 29, 2013, 08:19:08 PM »
What device has height of 1920? 1920 is generally width, not height.

dlewis

  • Guest
Re: strange issue with high resolution devices!
« Reply #11 on: April 29, 2013, 09:29:37 PM »
What device has height of 1920? 1920 is generally width, not height.

Could be a 1080p device in portrait.

warrenbaltz

  • Guest
Re: strange issue with high resolution devices!
« Reply #12 on: April 30, 2013, 07:05:27 AM »
I am using an HTC DNA, which is 1920 by 1080.  I am using it in portrait mode, so Screen.width correctly reports 1080.

warrenbaltz

  • Guest
Re: strange issue with high resolution devices!
« Reply #13 on: April 30, 2013, 09:32:42 PM »
Any ideas?  I don't mean to be a pest, but I have a commercial product based on NGUI that has to launch in a few days.  As a tentative workaround I've come up with:

if(Screen.width < 1080){
    label.lineWidth = (int)(Screen.width*0.9f);
}else{
    label.lineWidth = (int)(Screen.width*0.9f * 0.4f); //extra scaling compensates for weirdness
}

But it seems kludgy and likely to break. Is 1080 even the right cut off value? Who knows.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: strange issue with high resolution devices!
« Reply #14 on: April 30, 2013, 10:34:23 PM »
Default max setting on the UICamera is 1080, but you say you changed that -- so there is no reason why this would be different. It would help to see what you meant by "cut off".