Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

NGUI got smashed chars on mobile, but everything is fine on pc. How come?

Discussion in 'Scripting' started by JohnSonLi, Jan 7, 2015.

  1. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Check the size of the font texture and the maximum size of textures on your mobile device.
     
  3. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    the size of the font texture 627 x 57
    the maximum size of textures on your mobile device. 1024
    :any problems?
     
  4. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Is it set as a GUI texture, or otherwise allowed to be a non-power-of-two size? By default that'll get resized to a square (works better with GPUs that way), which means the UVs will be messed up for the characters. That's my guess.
     
  5. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    you mean the atlas texture's size?
    It is 2048x2048.
    the original texture is useless since it has been packed in atlas texture.
    I repack it the atlast again after switching to mobile platform, but the problem still resides......
     
  6. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Repacking is useless. On mobile that whole texture might be getting resized to 1024 due to memory/texture size limits. That will throw out the pre-calculated UV offsets for the characters. Check the platform-specific texture size settings, not the atlas generation settings.
     
  7. JohnSonLi

    JohnSonLi

    Joined:
    Apr 15, 2012
    Posts:
    586
    thx,that might help......