This package is intended to support emoji with TextMesh Pro sprite feature. By providing an editor tool to easily generate TextMesh Pro Sprite Asset from an emoji sprite sheet developers will be able to use unicode in text and let TextMesh Pro handle the sprite mapping and display by unicode.
Add this line to the dependecies:
{
"dependencies": {
"com.stanleychy.textmeshpro.emoji": "https://github.com/stanleychy/com.stanleychy.textmeshpro.emoji.git"
}
}
- Open Unity Package Manager from Unity Editor, Window > Package Manager
- Click the + button, select Add package from git URL...
- Input
https://github.com/stanleychy/com.stanleychy.textmeshpro.emoji.git
and click Add
- Download one of the emoji sprite sheet image and
emoji.json
fromhttps://github.com/iamcal/emoji-data
- Copy the downloaded sprite sheet image and json file into your Unity project
- Open the tool from the menu bar, Emoji > TextMeshPro Emoji Generator
- Select the downloaded emoji sprite sheet image and json file in the editor window, select target platform (Twitter by default) of the downloaded emoji sprite sheet image
- Click Generate TextMeshPro Emoji Sprite Asset button and the sprite asset supported by TextMeshPro will be generated next to the emoji sprite sheet image
- Open Project Settings > TextMesh Pro > Settings > Default Sprite Asset, select the newly generated sprite asset
- Emoji with longer unicode (exceed UTF-32) are not supported, limited by TextMeshPro's unicode size