10

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 ?

STF
  • 1,485
  • 3
  • 19
  • 36
Adam
  • 139
  • 1
  • 6
  • thanx but what's the goal of stackoverflow then ? – Adam Dec 21 '15 at 05:56
  • 4
    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 Dec 22 '15 at 16:43
  • @Krzysztof Bociurko I've learned something new from this question so I think it's the right place :) – Ivan Kaloyanov Jul 08 '18 at 12:33
  • for the inputfield part see https://stackoverflow.com/q/29637032/2008463 and https://stackoverflow.com/questions/39427741/writing-rtl-in-input-field?noredirect=1&lq=1 – Mohamed El-Nakeep Nov 10 '19 at 22:16

4 Answers4

1

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.
Ghasem
  • 14,455
  • 21
  • 138
  • 171
1

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

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

0

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.

Amin
  • 543
  • 7
  • 12