Hi,
I am trying to write some Arabic text in unity and the text is reversed to left to right…
I googled the problem and there seems to be some packages that can fix this but all non-free.
Did any body figure out a free solution so far?
Thanks
Hi,
I am trying to write some Arabic text in unity and the text is reversed to left to right…
I googled the problem and there seems to be some packages that can fix this but all non-free.
Did any body figure out a free solution so far?
Thanks
First and best solution is using Textmesh pro. Now it has TextMeshProGUI component which is the best choice for Arabic and Persian and RTL languages for UI and you can use it in canvas. having mesh in this component name Don’t let mislead you. It can be used in canvas and UI and is even better than default Text ui text component of unity. It has no any margin problem or multi line problem.
If you want a very quick solution you can use this package as simple as
yourText.faConvert ();
for multi-line support you should set line spacing to -1.
Next solution is using the package you refer to or a better version can be found here. the only problem with this packages is some margin problems. but you should change all the text component with RTLText component so when TextMeshPro is available there is no any reason to use it anymore.
The last solution is to use this localization asset which has some auto fix for RTL languages. For multi line support you can set line spacing to -1 or it has a simple solution to break line on a constant length.