Hello Guest

Author Topic: Text Alignment Issue  (Read 5273 times)

mradebe_eti

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 26
    • View Profile
Text Alignment Issue
« on: October 29, 2013, 03:02:02 am »
Hi,

I've got a text alignment issue. The scene's in Unity show the screens with the correct alignment, but whenever I test them on the iPhone, the text is always incorrect. I have attached 2 screenshots with the alignment issue.

Is this a 2D Toolkit version problem? What can I do to fix the issue? And is there any code I can use to fix all the affected screens, instead of manually fixing each one?

Any assistance is greatly appreciated.

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Text Alignment Issue
« Reply #1 on: October 29, 2013, 10:15:24 am »
How is it incorrect on the iPhone? I'm not sure what I'm looking at here?

mradebe_eti

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Text Alignment Issue
« Reply #2 on: October 29, 2013, 07:12:39 pm »
The values for Time and Score are not correctly aligned. They should not clip over any other text or the end of the screen (as per the screenshot). The weird thing is that the text does not have the same issue when viewing the scene within Unity.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Text Alignment Issue
« Reply #3 on: October 29, 2013, 10:33:15 pm »
How are you drawing that text? It doesn't look like the font next to it...

mradebe_eti

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Text Alignment Issue
« Reply #4 on: October 30, 2013, 02:16:17 pm »
I'm drawing it as GUIText.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Text Alignment Issue
« Reply #5 on: October 30, 2013, 07:29:13 pm »
GUI Text isn't aware of tk2dCamera scaling. You should probably use the same text system for both - it will simply work if you use the tk2d text system. Or the Unity text mesh system.