Author Topic: Mobile and Tablet Scaling  (Read 2432 times)

MrMitch

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
    • Rage Quit Games - Coming Soon
Mobile and Tablet Scaling
« on: November 26, 2013, 06:54:47 PM »
I'm currently having some issues getting my GUI to scale correctly on more than one device, i've messed with the UIRoot and read the doc info on the UIRoot but no luck.

Any advice?(i'm using playmaker)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Mobile and Tablet Scaling
« Reply #1 on: November 26, 2013, 11:43:10 PM »
How do you want it to scale? Scaling Style on the UIRoot is what controls scaling.

MrMitch

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
    • Rage Quit Games - Coming Soon
Re: Mobile and Tablet Scaling
« Reply #2 on: November 27, 2013, 07:04:38 AM »
Yeah i know Scaling Style controls the scaling but no matter how i set it up it doesn't scale properly with all my devices, looks fine on my Galaxy Note 2 but then when i try it on my Nexus 7 i can see the sides where the GUI doesn't cover and when it get it to look right on my Nexus 7 the GUI is slightly too wide on my Galaxy Note 2 yet they are apparently they exact same screen resolution :S

So am i missing something or just thinking that NGUI can do more than it actually does?

Help me  ;D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Mobile and Tablet Scaling
« Reply #3 on: November 27, 2013, 10:17:16 AM »
If they are the same screen resolution then everything should look identical. Have you tried to use NGUIDebug.Log(Screen.width + " " + Screen.height); just to double-check?

MrMitch

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
    • Rage Quit Games - Coming Soon
Re: Mobile and Tablet Scaling
« Reply #4 on: November 27, 2013, 12:43:19 PM »
Nope how do i do that?

EDIT

I did a resolution check via playmaker and it turns out they are different resolutions! very strange since the official websites say they are the same...

So back to scaling, any advice?

EDIT2

I did a little research and discovered that the resolution is different because of the nexus 7 having its home and back buttons on screen, so now i need to test my game on a device with a proper screen res and see what results i get ;D at least i think thats the right course of action unless you have any better suggestions?
« Last Edit: November 27, 2013, 08:17:17 PM by MrMitch »

MrMitch

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
    • Rage Quit Games - Coming Soon
Re: Mobile and Tablet Scaling
« Reply #5 on: November 28, 2013, 07:06:48 PM »
bump

should have maybe replied rather than editing might have been seen that way :P

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Mobile and Tablet Scaling
« Reply #6 on: November 29, 2013, 10:35:59 AM »
If the aspect ratio changes, then you are highly likely to see more or less depending on the width of the screen. Using anchors is the only proper way to alleviate it: http://www.tasharen.com/forum/index.php?topic=6712.0