protected virtual bool ParseInputTextAndEmojiCharSequence() { m_emojiParsingRequired = false; //Only parse when richtext active (we need the <sprite=index> tag) if (m_isRichText) { var v_parsedEmoji = false; var v_oldText = m_text; /*//Parse Sprite Chars * ParseInputText(); * * //Parse Emojis * m_text = CharBufferToString(); //Pick the char unicodes to parse the emojis * v_parsedEmoji = TMP_EmojiSearchEngine.ParseEmojiCharSequence(spriteAsset, ref m_text); * * //Apply parsed Emoji to char buffer * if (v_parsedEmoji) * { * StringToCharArray(m_text, ref m_char_buffer); * SetArraySizes(m_char_buffer); * }*/ v_parsedEmoji = TMP_EmojiSearchEngine.ParseEmojiCharSequence(spriteAsset, ref m_text); m_emojiParsingRequired = false; IsInputParsingRequired_Internal = false; InputSource_Internal = TextInputSources.Text; ParseInputText(); m_emojiParsingRequired = false; IsInputParsingRequired_Internal = false; //Debug.Log("ParseInputTextAndEmojiCharSequence"); //We must revert the original text because we dont want to permanently change the text m_text = v_oldText; #if !TMP_2_1_0_PREVIEW_10_OR_NEWER m_isCalculateSizeRequired = true; #endif return(v_parsedEmoji); } return(false); }
public override TMP_TextInfo GetTextInfo(string text) { TMP_EmojiSearchEngine.ParseEmojiCharSequence(spriteAsset, ref text); return(base.GetTextInfo(text)); }