All Projects → iBicha → Emojitexture

iBicha / Emojitexture

Licence: other
A Unity plugin to render Emojis ☺ ❤ 🍆 🍑 to a texture

Projects that are alternatives of or similar to Emojitexture

Unity Texture Curve
✏️ Example showing how to bake an AnimatedCurve into a Texture and use it in a shader.
Stars: ✭ 149 (+238.64%)
Mutual labels:  unity3d, texture
Nvjob Water Shader Simple And Fast
#NVJOB Simple Water Shaders. Free Unity Asset.
Stars: ✭ 172 (+290.91%)
Mutual labels:  unity3d, texture
Unity Texture Packer
🔨 Utility to combine color channels from different textures into a single output.
Stars: ✭ 429 (+875%)
Mutual labels:  unity3d, texture
Minimumaudioplugin
Minimum implementation of a native audio plugin for Unity
Stars: ✭ 33 (-25%)
Mutual labels:  unity3d
Easyanimation
一套操作极简轻量的Unity UGUI动画控制小工具,适用于Unity5.x以上
Stars: ✭ 35 (-20.45%)
Mutual labels:  unity3d
Grubo
Audio visual experience with Roland Groovebox MC-101 and the Unity game engine
Stars: ✭ 41 (-6.82%)
Mutual labels:  unity3d
Zenject Hero
Zenject 7 - Game example (WIP)
Stars: ✭ 44 (+0%)
Mutual labels:  unity3d
Unity Signals
Signals for Unity3D
Stars: ✭ 32 (-27.27%)
Mutual labels:  unity3d
Bepinex
Unity / XNA game patcher and plugin framework
Stars: ✭ 1,001 (+2175%)
Mutual labels:  unity3d
Xgoap
Goal oriented action planning beyond GOAP
Stars: ✭ 40 (-9.09%)
Mutual labels:  unity3d
Hololensarucounity
Marker tracking on HoloLens built on Aruco, OpenCV and Unity
Stars: ✭ 39 (-11.36%)
Mutual labels:  unity3d
Asdk Demo
Texture(ASDK) - Demo
Stars: ✭ 37 (-15.91%)
Mutual labels:  texture
Ecs Snake
Simple snake game powered by ecs framework.
Stars: ✭ 41 (-6.82%)
Mutual labels:  unity3d
Real Time 3d Pose Estimation With Unity3d
Stars: ✭ 34 (-22.73%)
Mutual labels:  unity3d
Minject
Mono Framework Interaction / Injection Library for .NET (C++/CLI)
Stars: ✭ 42 (-4.55%)
Mutual labels:  unity3d
Flutter Unity View Widget
Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
Stars: ✭ 961 (+2084.09%)
Mutual labels:  unity3d
Chasingplanes unity3d
A "Missiles" game replica, 2D fun mobile game about avoiding missiles while flying a plane.
Stars: ✭ 42 (-4.55%)
Mutual labels:  unity3d
Unitypluginwithwsl
Unity native plugin with WSL (Windows Subsystem for Linux)
Stars: ✭ 39 (-11.36%)
Mutual labels:  unity3d
Packedrgbmshader
32-bit packed color format with RGBM encoding for shader use
Stars: ✭ 39 (-11.36%)
Mutual labels:  unity3d
Scene View Bookmarks
Unity editor extension to bookmark scene views.
Stars: ✭ 40 (-9.09%)
Mutual labels:  unity3d

EmojiTexture

A Unity plugin to render Emojis ☺ ❤ 🍆 🍑 to a texture. Currently for iOS and Android only.

Please note that the editor is not supported. It will only render on device (should work on simulator as well)

Preview

Usage

As simple as:

material.mainTexture = new EmojiTexture("❤");

You can also do these things:

//Create an EmojiTexture with a specific size (best if power of 2)
var emojiTexture = new EmojiTexture(128);

//Change an existing EmojiTexture
emojiTexture.Text = "❤"; 

//Get the texture as an array of bytes, in case you want to do something with it
var bytes = emojiTexture.ByteBuffer;

//Know the code of the emoji? Set it directly as an integer!
//E.g. https://emojipedia.org/smiling-face-with-smiling-eyes/
emojiTexture.Unicode = 0x1F60A; //😊 Smiling Face With Smiling Eyes

Github emoji API (Experimental)

When not running Android or iOS, EmojiTexture can use Github emoji API. This require network connection. While the list of emojis is cached, individual images are not.

Setting emojis from Github needs to run in a Coroutine, because it is an async operation. It is possible to set the emoji text (same as above)

yield return emojiTexture.SetGithubEmoji("❤");

Or using keywords

yield return emojiTexture.SetGithubEmoji("❤️");

Please 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).

TextMesh Pro support (Experimental)

TextMesh Pro 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.

Setup

- Import TextMesh Pro from the Asset Store Use the new Package Manager to install TextMesh Pro (this should happen automatically since it is a project dependency)

Scripting Define Symbols

  • Add the component TMP_EmojiSupport on the same game object as your TextMeshPro or TextMeshProUGUI component. That's about it. You should have emoji support out of the box.
  • 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)

Optimizations

Few pointers to consider:

  • 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)

  • When a sprite sheet is full, a new one is created.

  • Currently cleaning up unused emojis is not yet supported. This will be added in the future.

Known issues.

  • 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.
  • 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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].