playMaker

Author Topic: gui text on different mobile devices  (Read 4804 times)

Vink

  • Playmaker Newbie
  • *
  • Posts: 19
gui text on different mobile devices
« on: November 21, 2013, 02:13:30 AM »
Hi

Im using unity's "gui text" to display score and im using playmaker to set property's
i have been testing my games on an emulator, but the other my friend let me borrow his phone to test the game and everything worked fine except the gui text which re-sized itself.

How do i make it so it adapts itself to different screen resolutions?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: gui text on different mobile devices
« Reply #1 on: November 28, 2013, 06:09:04 AM »
Hi,

Can you be more precise, is it a retina display difference or a screen ratio difference?

-- retina vs non retina: you should check manually for the phoen version and scale down your graphics and position by two ( always work with retina graphics and scale down if needed).

-- aspect ratio: use anchoring by setting your gui text at the borders of the screen exactly, and then apply pixel offsets and proper alignment to achieve in screen positioning.

example: bottom right alignment of a gui text:

transform position: 1,0,0
Anchor: Lower right
Alignment: left ( doesn't matter actually)
Pixel offset: 0,0

with this, you will have a gui text ALWAYS at th ebottom corner of your screen now matter the ratio.

If you have a retina: double the font size (26, default is 13), or if you work on retina by default, divide by two the font size.

bye,

 Jean


 Bye,

 Jean