Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

TextMesh Pro Full Emoji Support Api (emoji Sequen

Discussion in 'UGUI & TextMesh Pro' started by Rafael_CS, Apr 12, 2019.

  1. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    141
    Thanks again for the report, i fixed that in version 1.1.1

    Cound you try it again and tell me if it was fixed?
     
    Last edited: Apr 19, 2021
  2. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    98
    Thank you for the fast fix <3 . Yes, emoji 1.1.1 fixed the wrong parsing
    It also worked with the latest verified TMP for 2020 LTS ! (3.0.5)
    upload_2021-4-19_14-3-58.png
     
    Rafael_CS likes this.
  3. odk-mmmm

    odk-mmmm

    Joined:
    May 24, 2017
    Posts:
    2
    Are there any plans to support the TextMeshPro class? (it is used by GameObject/3D Object/Text - TextMeshPro)
     
  4. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    141
    Not now, but EmojiSearchEngine contains the method to pre-parse emoji text into valid text to you TextMeshPro 3d object.

    Just use

    TMP_EmojiSearchEngine.ParseEmojiCharSequence(spriteAsset, ref text).

    Now pick the text return and set it into your tmp 3d object
     
    jiraphatK and odk-mmmm like this.
  5. odk-mmmm

    odk-mmmm

    Joined:
    May 24, 2017
    Posts:
    2
    oh great

    I was able to convert the emoji sequence to sprite tags in TextMeshPro class with the following code.

    Thanks for your advice.

    Code (CSharp):
    1.     private void Start()
    2.     {
    3.         var tmp = GetComponent<TextMeshPro>();
    4.  
    5.         using (var sr = new StreamReader("Assets/emoji.txt", Encoding.GetEncoding("utf-8")))
    6.         {
    7.             var emojiText = sr.ReadToEnd();
    8.             TMP_EmojiSearchEngine.ParseEmojiCharSequence(tmp.spriteAsset, ref emojiText);
    9.             tmp.text = emojiText;
    10.             GUIUtility.systemCopyBuffer = emojiText;
    11.         }
    12.     }
     
    Rafael_CS likes this.
  6. manundi

    manundi

    Joined:
    Jun 30, 2019
    Posts:
    7
    This is amazing! I was getting very frustrated with emojis on my project and now I am very close to solve it all with your package. The last problem is that I am building for WebGl. Emojis work on editor but not on Webgl builds. So is there any way of getting it work with the package or is there a way to export a correctly formatted json to use with original TMP sprite asset creator?
     
  7. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    141
    Why not working in webgl?

    In theory this package should work regardless of platform selected.

    Please, provide more informations.
     
    Last edited: Apr 22, 2021
  8. manundi

    manundi

    Joined:
    Jun 30, 2019
    Posts:
    7
    Thanks for quick reply! I will continue testing after 8 hours at day job and provide more info. Meanwhile has someone got it working on Webgl? For me it's just squares where emoji should be.
     
  9. manundi

    manundi

    Joined:
    Jun 30, 2019
    Posts:
    7
    I had made a mistake and did not have sprite assets on resources folder. I can confirm this is working for WebGl! Thanks again!
     
    Rafael_CS likes this.
  10. dujimache

    dujimache

    Joined:
    Dec 17, 2011
    Posts:
    66
    any exact plan of supporting EmojiCharSequence???
     
  11. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    14
    Hi Rafael,

    I noticed that some emojis are not working in my Unity app. Here is an example:

    upload_2021-5-4_22-21-17.png

    My questions:
    1) is this due to the my sprite sheet simply not having all emojis?
    2) if so, is there any easy way to solve this (either paid or free)? I've tried different sprite sheets from the github repository that you linked in the first page, but they all have the same issue. I also noticed that those sprite sheets are "Emoji 13.0", while the newest set is "14.x"

    If you have any pointers on this, i'd be grateful if you could share. Thanks! :)
     
  12. Rafael_CS

    Rafael_CS

    Joined:
    Sep 16, 2013
    Posts:
    141
    Yeah, you are correct.

    Unfortunally this repository contains sprite from version 13.0 and android upgraded to 14.

    We must wait for repository upgrade unfortunally.
     
    Last edited: May 4, 2021
  13. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    14
    Okay, thanks for the prompt response. Then at least i know that i can stop searching for solutions - and will keep an eye on the repository!
     
  14. odysoftware

    odysoftware

    Joined:
    Jul 21, 2015
    Posts:
    61
    Just tested it with latest 3.06 and your 1.1.1 - looks fine :)
     
  15. unity_3tkPsqh9qtbrCw

    unity_3tkPsqh9qtbrCw

    Joined:
    Feb 9, 2019
    Posts:
    1
    Hello everyone
    Faced a problem. When trying to enter the smile :smiling_face_with_tear: then the application crashes. Unity 2019.4.16, Emoji version 1.1.1 and TextMeshPro 2.1.16
    The problem was with the previous versions of TM Pro and Smile Plugin too
    Has anyone had similar problems?
     
unityunity