{"id":15160641,"url":"https://github.com/ibicha/emojitexture","last_synced_at":"2025-09-30T12:30:26.952Z","repository":{"id":45522522,"uuid":"115889563","full_name":"iBicha/EmojiTexture","owner":"iBicha","description":"A Unity plugin to render Emojis ☺ ❤ 🍆 🍑 to a texture ","archived":true,"fork":false,"pushed_at":"2023-02-07T19:26:28.000Z","size":829,"stargazers_count":62,"open_issues_count":17,"forks_count":9,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-12T03:52:49.590Z","etag":null,"topics":["android","ios","texture","unity-plugin","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iBicha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-31T23:14:09.000Z","updated_at":"2024-09-23T11:53:45.000Z","dependencies_parsed_at":"2022-07-16T01:47:55.149Z","dependency_job_id":null,"html_url":"https://github.com/iBicha/EmojiTexture","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/iBicha%2FEmojiTexture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBicha%2FEmojiTexture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBicha%2FEmojiTexture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iBicha%2FEmojiTexture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iBicha","download_url":"https://codeload.github.com/iBicha/EmojiTexture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234732488,"owners_count":18878416,"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":["android","ios","texture","unity-plugin","unity3d"],"created_at":"2024-09-26T23:04:56.171Z","updated_at":"2025-09-30T12:30:21.549Z","avatar_url":"https://github.com/iBicha.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EmojiTexture\n##### :warning: Unity now supports [Emojis using TextMesh Pro](https://docs.unity3d.com/Packages/com.unity.textmeshpro@3.2/manual/ColorEmojis.html). Please use that package instead, since this project hasn't been updated for a while. \n\nA Unity plugin to render Emojis ☺ ❤ 🍆 🍑 to a texture. Currently for iOS and Android only.\n\nPlease note that the editor is not supported. It will only render on device (should work on simulator as well)\n\n## Preview\n\u003cimg src=\"https://raw.github.com/iBicha/EmojiTexture/master/preview.gif\"\u003e\n\n\n## Usage\nAs simple as:\n```csharp\nmaterial.mainTexture = new EmojiTexture(\"❤\");\n```\nYou can also do these things:\n```csharp\n//Create an EmojiTexture with a specific size (best if power of 2)\nvar emojiTexture = new EmojiTexture(128);\n\n//Change an existing EmojiTexture\nemojiTexture.Text = \"❤\"; \n\n//Get the texture as an array of bytes, in case you want to do something with it\nvar bytes = emojiTexture.ByteBuffer;\n\n//Know the code of the emoji? Set it directly as an integer!\n//E.g. https://emojipedia.org/smiling-face-with-smiling-eyes/\nemojiTexture.Unicode = 0x1F60A; //😊 Smiling Face With Smiling Eyes\n\n```\n## Github emoji API (Experimental)\nWhen not running Android or iOS, EmojiTexture can use [Github emoji API](https://developer.github.com/v3/emojis/).\nThis require network connection. While the list of emojis is cached, individual images are not.\n\nSetting emojis from Github needs to run in a `Coroutine`, because it is an async operation.\nIt is possible to set the emoji text (same as above)\n```\nyield return emojiTexture.SetGithubEmoji(\"❤\");\n```\nOr using keywords\n```\nyield return emojiTexture.SetGithubEmoji(\":heart:\");\n```\n\nPlease check out example scene for usage (it includes a native emoji, a github emoji and TextMesh Pro examples, that shuffle emojis from script or read user imput with touch screen).\n\n\n## TextMesh Pro support (Experimental)\n[TextMesh Pro](https://assetstore.unity.com/packages/essentials/beta-projects/textmesh-pro-84126) already supports emojis as sprites, but they need to be prepared beforehand, which makes it troublesome in terms of build size (and also a lot of manual work), if you want to support as many emojis as possible. This is where EmojiTexture comes in. It generates these sprites on the fly as they are needed.\n\n## Setup\n~~- Import TextMesh Pro from the [Asset Store](https://assetstore.unity.com/packages/essentials/beta-projects/textmesh-pro-84126)~~ Use the new **Package Manager** to install TextMesh Pro (this should happen automatically since it is a project dependency)\n- In the Player Settings, add `TMPRO_EMOJIS` to the [Scripting Define Symbols](https://docs.unity3d.com/Manual/PlatformDependentCompilation.html)\n\n![Scripting Define Symbols](https://docs.unity3d.com/uploads/Main/ScriptDefines.png)\n- Add the component `TMP_EmojiSupport` on the same game object as your `TextMeshPro` or `TextMeshProUGUI` component.\nThat's about it. You should have emoji support out of the box.\n- On the `TMP_EmojiSupport` component, if `Github fallback` is checked, the emojis will be downloaded from github if you are not running on Android or iOS (and if you have network)\n\n## Optimizations\nFew pointers to consider:\n\n \n- Emojis are stored in sprite sheets of the size 4 by 4 (16 emojis) with an emoji texture of `128x128` pixels (which makes a `512x512` per sprite sheet.) These are constants defined in `TMProEmojiAsset.EMOJI_SIZE` and `TMProEmojiAsset.SHEET_TILES`. Optimize these values according to your use case. **BE AWARE** currently, github returns enoji images as `128x128`, and they share the same sprite sheet. Changing these constants will probably break emojis from github. (A resizing method needs to be implemented for that purpose, but that would be at the cost of performance)\n\n- When a sprite sheet is full, a new one is created.\n- Currently cleaning up unused emojis is not yet supported. This will be added in the future.\n\n## Known issues.\n- While the native emoji renderer (Android/iOS) tries to estimate the correct rendering, Github emojis and TMP both have trouble with complex emojis (such as flags, emojis with skintones, etc). These will be addressed in the future, as there is room for improvement.\n- Some rendering issues are due to how TMP works, because it scans for unicode characters, and we get to feed it sprites. This needs to be fixed on TMP's side.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibicha%2Femojitexture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibicha%2Femojitexture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibicha%2Femojitexture/lists"}