Does it work programatically?
I'm building an app where almost all text is set during runtime, using t.text=something. I've tried replacing TextMeshProUGUI with RTLTextMeshPro, but it just doesn't work.
Here are some screenshots:
- https://i.imgur.com/4LRjYYm.png
- https://i.imgur.com/bBCwDyM.png
Before I set the text, if it's in Arabic, I'm setting the font, so the operation is:
t.font=something;
t.text=somethingElse;
This is because I need to support multiple languages. Unfortunately, I don't know Arabic so detecting problems is slow.
Can you point me to the right direction to resolve this?
Edit: Apparently there's one more bug, or a combination of bugs: auto-sizing height doesn't work, so the component misbehaves in a HorizontalLayoutGroup and sets its size to 1, and the original content is not updated / replaced with Arabic text until I change the component height in editor, which forces some kind of update, possibly related to wrapping. The problems persist even if I use an Arabic font from the start and don't replace the font at runtime. I've tried using a Western font and adding an Arabic font as fallback, and an Arabic font with a Western font as fallback, and in both cases I can't get the Arabic text to render. Here's a new screenshot: https://i.imgur.com/Ki4ZTSH.png
i have kind of same problem in runtime if you change the text property of RtlTmp_Text after you enter 3 or more character the older characters change im using unity 2021.3.26f1
@ivoras What Unity version are you using?
This asset has usages of RTLTMPro package with live language changes. You can use that as a reference on how to use RTL text.
It's Unity 2021.3.30 now but it was 2021.3.24 then.