9
votes

Does unity support arabic writing in InputField UI or even GUI Texts ? I mean if I want to write arabic characters in the InputField, does unity support that ?

4
thanx but what's the goal of stackoverflow then ?Adam
There is a major rule on SO: it's for things that you got stuck on or require an experts point of view. If it's trivial to check or you did not even try to solve this by yourself - why would anyone else bother?Krzysztof Bociurko
@Krzysztof Bociurko I've learned something new from this question so I think it's the right place :)Ivan Kaloyanov

4 Answers

1
votes

There's a free library for supporting Arabic language in Unity. You can download it here

This is part of the readme file. Just add the library and use one of GUIText or 3DText prefabs.

  1. To use the Unity Arabic Support asset inside a script, use: using ArabicSupport;
  2. After using the using statement, use the following method (returns a string): ArabicFixer.Fix(textToBeFixed);
  3. And you're done! You can use the alternative: ArabicFixer(string, tashkeel, hindoNumbers) for more customization options.
1
votes

No by default but there are libraries/asset packs to make it work.

Just search "Arabic" in the unity store to find them.

Keep in mind that it is really hard to setup TextMeshPro (The addon pretty much everyone uses for crisp text in unity) in Arabic with a different font as most Arabic fonts you find will not have all the characters you need.

Lookup this to see the encoding range you need to put in the font asset creator.

For example you will be able to write letters but only some of the letters will be connected as the font does not have all possible connections and unity wont make them by default.

But I think the Adobe Arabic has all the letters for a start.

0
votes

It should if you save the script with UTF-8 encoding. Then you should be able to include all unicode characters in there.

0
votes

short answer : unity doesn't support Arabic or Persian although there are bunch of plugins on assets store that can buy you some times. you can find them easily.