Welcome, Guest
Username: Password: Remember me

TOPIC: Only one text look weired at time of launch

Only one text look weired at time of launch 2 weeks 6 days ago #2548

  • Abhi6257
  • Abhi6257's Avatar
  • Offline
  • New Member
  • Posts: 2
  • Karma: 0
i am not using spredshit just put text in componet.i am using Unity UI text comopment.i attached screnshot this happen with my text.give me solution please.
Attachments:
The administrator has disabled public write access.

Only one text look weired at time of launch 2 weeks 5 days ago #2551

  • Frank
  • Frank's Avatar
  • Offline
  • Administrator
  • Posts: 897
  • Thank you received: 193
  • Karma: 57
What you are experiencing is a bug in Unity when using Dynamic Fonts. Its amazing that after so many month, Unity hasn't fix it yet!!!
The problem is that when changing the text dynamically, if the characters are not in Unity's built atlas, some times it will work fine, and sometimes it will only work after switching the text a few times.

These are some workarounds for this:

1- You  can use a different font. Unity handles the generation better for some fonts than for others. Specially if your device's language is not English, so it has to render Arabic/Chinese or other non-latin characters.

2- You can add code into the UI Text target to force generate the needed characters. Try the follow change and if it works for you, I will add it to the future version of the plugin:
in file Assets\I2\Localization\Scripts\Targets\LocalizeTarget_UnityUI.cs  line 168, add the following if:
                mTarget.text = mainTranslation;
                mTarget.SetVerticesDirty(); 

                if (mTarget.font != null)
                {
                    mTarget.font.RequestCharactersInTexture (mainTranslation, mTarget.fontSize);
                }

                // In the editor, sometimes unity "forgets" to show the changes

Hope that helps,
   Frank
Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The administrator has disabled public write access.
Time to create page: 0.105 seconds
Colors