Only one text look weired at time of launch

More
6 years 4 months ago #2548 by Abhi6257
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:

Please Log in or Create an account to join the conversation.

More
6 years 4 months ago #2551 by Frank
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

Please Log in or Create an account to join the conversation.

Time to create page: 0.284 seconds
Template by JoomlaShine