I am having hard time finding a solution to display text written in other languages.
Here is the issue:
Player login in my game through Facebook and facebook provides data alongside users name. now if the name is in english then everything works perfectly fine but if it is written in other language, e.g. Hindi or Bangla then it is not displayed in the Android build however I can clearly see it in Unity Editor.
So far, I have tried to use Hindi Fonts in unity to display the text but shows empty inside the Text UI and in the print call as well.
This is the hindi name I have received from Facebook:
“name”:”u0930u093eu092e”
Result when displayed this text in LegacyText and TMP Text in the Unity Editor:
Result when displayed in the Android device:
My code:
public void Click() {
var check = "u0930u093eu092e";
Debug.Log(check);
text.text = "LagacyText " + check;
Debug.Log($"text: {text.text}");
text2.text = "TMP Text " + check;
Debug.Log($"text2: {text2.text}");
}
My goal is simple to display the player’s name as I have received it from facebook, regardless of its language.