Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

TextMeshPro emoji unicode problem

Discussion in 'UGUI & TextMesh Pro' started by mkwoo, Aug 30, 2019.

  1. mkwoo

    mkwoo

    Joined:
    Sep 6, 2017
    Posts:
    2
    Hi all,

    So I'm fairly new to TMP and i'm trying to make emojis work. I've downloaded all emojis from https://openmoji.org/library/#group=smileys-emotion and used TexturePacker to pack the sprites into a JSON (Array). Now in Unity, I used TMP's sprite importer to create my sprite asset. Now from what I've read, TMP's sprite importer will automatically set the emoji's unicode based on the sprite's name. I've tried it and it does. However, emojis with more than one code points are the problem. Let's take the flag of Canada for example, the name of its sprite is 1F1E8-1F1E6, and TMP's sprite importer maps it to only 1F1E6 which overlooks the 1F1E8 part. Now i'm quiet lost at this point, can anyone help?
     

    Attached Files:

  2. Stephan_B

    Stephan_B

    Unity Technologies

    Joined:
    Feb 26, 2017
    Posts:
    6,588
    Emojis with more than Unicode are Emoji modifier sequences. They are essentially ligatures which is not currently supported but will be in the future.

    Depending on your use case, you could manually name those specific Emojis like "Canada" and reference them by name using the <sprite name="Canada">. You would have to give the unique unicodes as they all share the same lower unicode prefix of 1F1E8.

    Now if you are trying to allow your users to access them in the text using proper emoji modifiers / ligatures then you will need to wait for that support to be available.
     
    mkwoo likes this.
  3. cxode

    cxode

    Joined:
    Jun 7, 2017
    Posts:
    268
    Do you have a status update or ETA for this feature? (I don't need it badly or urgently, but it'd be nice to have, and I'd rather not use the hacky third party solution)
     
  4. urican

    urican

    Joined:
    May 27, 2015
    Posts:
    1
    Hello, Any update with this unicode issue ? Any workaround ?

    How do I use conplex emoji codes in sprite assets ?

    i.e.

    1F1E8-1F1E6
     
    Ardito92ITA likes this.
  5. Ardito92ITA

    Ardito92ITA

    Joined:
    Apr 1, 2014
    Posts:
    37
    News??
    How do we use complex emoji codes in sprite assets ?
     
  6. RahmatAli_Noob

    RahmatAli_Noob

    Joined:
    Sep 13, 2022
    Posts:
    73
    Hi there,
    I am using the Emoji's with the Sprite asset and I can use the Emoji's with single Unicode Like "U+1F600" , but there is the Issue that how can I use the Emoji's with the long Unicode Like" u1f3c3_1f3fb_200d_2640" the Running Girl Emoji.
    I try to write it and it shows the Girl but with the Emoji it shows the Boxes.
    Will you please let me know How I can Do it.
    Thanks in Advance.
    @Stephan_B
    @HugoBD-Unity