void Awake()
    {
        upText = null;

        // Set Rtl Text without any additional changes.
        upText.text = "سلام بدون نیاز به تغییر متن!";

        // returns modified text. (Reverse and line fix to show correctly in Ui)
        print(upText.text);

        // BaseText returns original text. you sould use BaseText if you want to post rtl usernames to server or anywhere you need original rtl text value
        print(upText.BaseText);

        // keep in mind that you allways can fix original BaseText and use whereever you want using .RtfFix()
        print(upText.BaseText.RtlFix());
    }
Пример #2
0
        private static void CreateRtlText()
        {
            Transform parent = FindCorrectParent();

            if (parent == null)
            {
                return;
            }
            if (_rtlText == null)
            {
                _rtlText = Resources.Load <RtlText>("RtlText");
            }
            RtlText rtlText = Instantiate(_rtlText);

            rtlText.transform.SetParent(parent, false);
        }
Пример #3
0
 // Use this for initialization
 void Start()
 {
     t      = GetComponent <RtlText>();
     t.text = hints[Random.Range(0, hints.Length)].GiveText();
 }