Esempio n. 1
0
        IEnumerator ProcessAsync(string text)
        {
            yield return(TMProEmojiAsset.ProcessAsync(text));

            if (TMProEmojiAsset.didProcessAsync)
            {
                yield return(ApplyChangesNextFrame());
            }
        }
Esempio n. 2
0
        void OnTextChange(object obj)
        {
            TMP_Text tmp_Text = (TMP_Text)obj;

            if (tmp_Text == textComponent && lastProcessedText != textComponent.text)
            {
                var text = textComponent.text;
                lastProcessedText = text;

#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
                bool spriteSheetUpdated = TMProEmojiAsset.Process(text);

                if (spriteSheetUpdated)
                {
                    StartCoroutine(ApplyChangesNextFrame());
                }
#else
                if (githubFallback)
                {
                    StartCoroutine(ProcessAsync(text));
                }
#endif
            }
        }
Esempio n. 3
0
 private void Awake()
 {
     textComponent = GetComponent <TMP_Text>();
     TMProEmojiAsset.HookTMP(textComponent);
 }