playMaker

Author Topic: GUI text/texture - relative x/y coords (multiple screen res)[SOLVED]  (Read 2450 times)

mmzbr

  • Playmaker Newbie
  • *
  • Posts: 40
Hey Guys,

I´m about to finish my first game using Playmaker/Unity but I had one problem with the Android Builds.

I had to set a X/Y coords to define where I want to display my texts and UI stuff but Android OS have a lot of devices and different screen resolutions/ratios.

When I run in my test cellphone the text and textures are properly displayed, but when I run in my test table the text appear in middle of screen and not on the top.

There´s a way to setup those coords in GUI Texture/Text with relative values instead absolute (like im doing right now) using default playmaker actions? If so, how should I proceed?

Thanks in advance and sorry my English.
« Last Edit: July 30, 2013, 02:09:52 PM by mmzbr »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUI text/texture - relative x/y coords (multiple screen res)
« Reply #1 on: July 30, 2013, 05:19:28 AM »
Hi,

 setting guiTexture in relative mode is easy. you have to edit the transform position instead of the inset, then it's relative to the screen size: if you drop a guiTexture, you'll see that's centered on screen, BECAUSE its position is 0.5,0.5

How do you currently set theses x and y coordinates?

bye,

 Jean

mmzbr

  • Playmaker Newbie
  • *
  • Posts: 40
Re: GUI text/texture - relative x/y coords (multiple screen res)
« Reply #2 on: July 30, 2013, 02:09:35 PM »
Worked like a charm! Thank you very much!  ;D