Emoji support in Unity 2019.3 and older

My experience with emoji implementation

Once I was tasked to add emoji support to our unity project we were porting to mobile devices.

As always I started googling, to my surprise I couldn’t find any specific solution to my problem. That’s kinda awkward because it feels like a core feature in terms of platform support.

What’s interesting, when I looked at games available in the AppStore (iOS) most of them didn’t support emojis! What the heck!?

During my web trip I stumbled on useful informations and packages that helped me form my take on emojis. I’d like to share this piece with you!

Getting started

You will need these assets first:

  • TMPro package with Essentials imported
  • Emoji sprite sheet texture for target platform
  • Emoji sprite assets (iOS & Android)

Sprite assets were created using tool that is part of this package PING
Since it is not necessary to have yet another package in the project I decided to use just one of the features: Sprite Emoji Importer.

You can find all fo the files and configurations in sample project I created here: PING
It is ready to build for both iOS and Android platforms.

Even though the process is quite easy you may find some of the emojis to create visual artfacts.


With the preparation done, all we need to assign the SpriteAssets to TextMeshPro Settings.

By default Settings asset is located at path:
Assets/TextMesh Pro/Resources/TMP Settings

This applies for all of the TMP texts in your project. You can as well assign the SpriteAsset to specific TMP objects in your scene.

Just assign the proper SpriteAsset and you’re done.

Is that all?

Well, yes if your build target is Android.

iOS Xcode fixes

During my study I found many issues in various unity versions. All of them reside in the script: Classes/UI/Keyboard.mm

Apparently Unity team has done wonderful job to fix all the crashes that did happen when one tried to type an emoji into Input Field which reached it’s character capacity.


Can’t type emoji in 2019.3.0f6

They forgot to check whether an Input Field has got character limit set in the first place!

To fix the issue in Keyboard.mm check the following if statement line 640 (in my case) to include _characterLimit check.

    // If the user inserts any emoji that exceeds the character limit it should quickly reject it, else it’ll crash
    if (newLength > _characterLimit && StringContainsEmoji(text_))
        return NO;


    // If the user inserts any emoji that exceeds the character limit it should quickly reject it, else it’ll crash
    if (newLength > _characterLimit && _characterLimit != 0 && StringContainsEmoji(text_))
        return NO;

Important NOTE

If you apply the above solution to your Xcode project it may get erased next time you build the product.

In this case you can edit the Keyboard.mm source file which is located here:


This change will affect every build you make in the future.


Alright folks, we’ve reached to destination. I hope you managed to add the emojis to your project.

Still got some issues? Feel free to contact me here PING

See ya!


Leave a Reply

newest oldest most voted

Great content! Super high-quality! Keep it up! 🙂


Does it have to use text mesh pro ? Whats about using Text Mesh only ? coz Text mesh pro does not support Localization. Thanks.