{"id":13544650,"url":"https://github.com/mcraiha/Unity-UI-emoji","last_synced_at":"2025-04-02T14:31:43.492Z","repository":{"id":98552644,"uuid":"45337974","full_name":"mcraiha/Unity-UI-emoji","owner":"mcraiha","description":"Show emoji images in Unity UI text","archived":true,"fork":false,"pushed_at":"2017-06-21T07:18:02.000Z","size":16984,"stargazers_count":175,"open_issues_count":3,"forks_count":34,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-03T11:34:13.555Z","etag":null,"topics":["emoji","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcraiha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-01T11:40:03.000Z","updated_at":"2024-09-14T09:21:38.000Z","dependencies_parsed_at":"2023-07-13T08:30:24.244Z","dependency_job_id":null,"html_url":"https://github.com/mcraiha/Unity-UI-emoji","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcraiha%2FUnity-UI-emoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcraiha%2FUnity-UI-emoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcraiha%2FUnity-UI-emoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcraiha%2FUnity-UI-emoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcraiha","download_url":"https://codeload.github.com/mcraiha/Unity-UI-emoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246832448,"owners_count":20841167,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emoji","unity"],"created_at":"2024-08-01T11:00:51.931Z","updated_at":"2025-04-02T14:31:38.456Z","avatar_url":"https://github.com/mcraiha.png","language":"C#","funding_links":[],"categories":["Unity3d"],"sub_categories":["Miscs"],"readme":"**Update:**\n[TextMesh Pro](https://www.assetstore.unity3d.com/en/#!/content/84126) is now free, and it will be [integrated to Unity](https://twitter.com/unity3d/status/836625140054179842). So if you want to use Emojis in your Unity project, I would suggest that you use it instead of Unity-UI-emoji.\n\n# Unity-UI-emoji\nShow emoji images in Unity UI text\n\n![Emojis](https://github.com/mcraiha/Unity-UI-emoji/blob/master/unity_emoji.png)\n\n[WebGL demo](http://mcraiha.github.io/demos/emoji/)\n\n## Introduction\nSince Unity doesn't have build-in emoji support in it, I wanted to test out different approaches for showing emoji in Unity projects.\n\nThis one shows emoji via UI Text.\n\n## How to use\nDownload and import the Unitypackage [unity_emoji_v200.unitypackage](https://github.com/mcraiha/Unity-UI-emoji/blob/master/unity_emoji_v200.unitypackage) to your project. Open showoff scene and press play to see the emojis in action.\n\nBasically you have to have a RawImage with emoji atlas set in the scene (in this case **rawImageToClone** in [ShowOffEmoji.cs](https://github.com/mcraiha/Unity-UI-emoji/blob/master/Assets/Scripts/ShowOffEmoji.cs)) to be used for emoji replacement. After that you can call\n```cs\nStartCoroutine(this.SetUITextThatHasEmoji(uiText, \"⚽ ➕ ❤ = I love football\"));\n```\nto set your uiText.\n\n## How does it work under the hood\n1. step, rebuild the input string and replace any emoji (or special char) with (em quad)[https://en.wikipedia.org/wiki/Quad_(typography)] char, e.g. string \"my ™ is best\" -\u003e \"my   is best\"\n2. step, set UI Text to rebuild text (so emojis are drawn as blank)\n3. step, generate new RawImage for each replaced emoji, position those correctly and set correct atlas UVs\n\n## Tips\n- If you don't need/want e.g Copyright symbol (a9.png) to be drawn as emoji then you can just remove the file (a9.png) and rebuild the atlas\n- You can add/replace PNGs if you need new emojis or custom symbols (rebuild atlas after that)\n\n## Limitations\n- You have to get emoji graphics from somewhere. In this case I used those provided by Twitter via their [Twemoji](https://github.com/twitter/twemoji) project. Graphics licensed under CC-BY 4.0 [https://creativecommons.org/licenses/by/4.0/](https://creativecommons.org/licenses/by/4.0/)\n- You have to create atlas from those emoji textures ([EmojiAtlasBaker.cs](https://github.com/mcraiha/Unity-UI-emoji/blob/master/Assets/Scripts/EmojiAtlasBaker.cs) does that)\n- Every emoji shown requires new RawImage element\n- You have to manually adjust RawImage settings (pivot etc.) to make them match your font\n- Only supports one pixel size (albeit transform scaling can be used, but in that case pixel accuracy is lost)\n- ~~Not all emojis are supported texture wise since current release of Twitter's [Twemoji](https://github.com/twitter/twemoji) project is \"only\" Unicode 7.0 complete.~~ Twemoji is Unicode 8.0 complete\n- Font needs to have (em quad)[https://en.wikipedia.org/wiki/Quad_(typography)] char (or something similar, that draws 1:1 blank)\n\n## Ugly stuff\nAll emojis that fit into single C# char (e.g. chars like ⚽ ➕ ❤) can be written directly to code but longer ones have to entered as [escape sequences](https://msdn.microsoft.com/en-us/library/aa664669(v=vs.71).aspx).\nCertain emojis require 4 chars (like US Flag, **U+1F1FA U+1F1F8**) since it build from 2 emojis (letters U **U+1F1FA** and S **U+1F1F8**).\n\n## Licences\nThis document, code files and scene file are licenced under Public domain. See [PUBLICDOMAIN](https://github.com/mcraiha/Dithering-Unity3d/blob/master/PUBLICDOMAIN) file.\n\nEmoji textures (in [Assets/Textures/Emojis](https://github.com/mcraiha/Unity-UI-emoji/tree/master/Assets/Textures/Emojis) folder) and [Emoji atlas](https://github.com/mcraiha/Unity-UI-emoji/blob/master/Assets/Textures/Baked/BakedEmojis.png) are licensed under CC-BY 4.0 [https://creativecommons.org/licenses/by/4.0/](https://creativecommons.org/licenses/by/4.0/). All emoji textures are from Twitter's [Twemoji](https://github.com/twitter/twemoji) project.\n\nRoboto font (in [Assets/Fonts/Roboto-Regular.ttf]) is licensed under Apache License, version 2.0 [http://www.apache.org/licenses/LICENSE-2.0.html]. It is from [Google Fonts](https://www.google.com/fonts/specimen/Roboto).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcraiha%2FUnity-UI-emoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcraiha%2FUnity-UI-emoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcraiha%2FUnity-UI-emoji/lists"}