Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by SercanSavran · Dec 31, 2019 at 12:19 AM · texturetextmeshspritesheet

Importing own Sprite atlas to TextMeshPro Unicode Emojis

Hello there (TL;DR. at the end of question),


Background: I'm using Unity Unity version 2019.2.16f1 and trying to add some Emoji support since TextMeshPro has only 16 Emojis supported. There is by default a sprite atlas and a .json file in TextMeshPro (LiberationSans SDF Material), which bases on EmojiOne. When I create a GameObject and add a TextMeshPro-Component and enter the Unicode \U0001F60D into the text property via inspector, the Emoji (1F60D.png) does is displayed both in the scene and in the game.


Goal: I want to add my own Unicode Emojis (105 Emojis in total), import them into Unity and use it with TextMeshPro with Unicode.


What I've done so far: To accomplish this, I'd already created an emoji atlas with the emojis I need to support, using TexturePacker (which were used for the default emojis too) and exported the atlas (emoji.png), data file (.tpsheet) and the .json file as in the default emoji integration of TextMeshPro. I did add the TexturePackerImporter for Unity in my project. I hoped to override the default sprite atlas (.png file) and the data file (.json) in TextMeshPro, which obviously worked out. I know this would be too easy :D


Issue: I don't know how to import the emoji atlas with 105 different emojis in it in order to use it like a font. Would love to hear your suggestions and appreciate any suggestions, links, tutorials or whatever.


TL;DR.: Using TextMeshPro for Emoji visualization, which has just 16 Emojis by default. Want to import my own emoji pack and use it with Unicode (e.g.: \U0001F60D for heart-eye emoji). Created a sprite atlas and a JSON-Data-File by using TexturePacker. Don't know how to import it into TextMeshPro to use it as usual.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
5
Best Answer

Answer by SercanSavran · Dec 31, 2019 at 05:22 AM

I figured out how to solve the issue and will do a step by step explanation for others: Make sure TexturePackerImport is installed and imported into your project click here to download

  1. Put all .png files into TexturePacker

  2. Edit Framework for Output files in the settings to -> JSON (Array)

  3. If prompted for phaser framework, go for the option "keep JSON Array" and it will export both the sprite atlas (.png) and the configuration file (.json)

  4. Add both in your assets folder in Unity.

  5. In Unity go to Window -> TextMeshPro -> Sprite Importer

  6. If TexturePackerImporter was added successfully into your project, the Import Format should be Texture Packer (keep this). Select the .json file for Sprite Data Source and the .png file for the sprite atlas. After choosing these out of your assets folder, click Create Sprite Asset.

  7. Now in the Project-Explorer of Unity the sprite atlas should have an arrow at the right, which makes it expandable like a list. By expanding this you should be able to see each emoji you'd in your atlas separately.

  8. Keep the sprite atlas (.png) file selected (this is important, otherwise Unity throws a warning that you haven't chosen any files) and go to Assets -> Create -> TextMeshPro -> Sprite Asset.

  9. Now this is important -> If you select your Sprite Asset, which you'd created in the previous step, you have to make sure, that the Unicode Value in Sprite Character Table (in the Inspector) is filled (e.g.: the unicode value for 1f4a9.png should be 0x1F4A9). In my case it weren't filled automatically, which took a bit time to enter them one by one.

I hope this will help someone in the future.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image justin_bling · Jun 19, 2020 at 08:05 PM 1
Share

I'm attempting to do the same thing! I'm confused as I got to step 2 and didn't know where to do that. I currently have an emoji spritesheet png file which I got on the web, with Text$$anonymous$$eshPro and TexturePacker installed. Where would I go from there?

avatar image envysion · Jul 08, 2020 at 09:38 PM 0
Share

You saved me!! Thank you so much!

avatar image
0

Answer by gillemp · Dec 06, 2021 at 03:34 PM

Following @SercanSavran instructions, I ended up creating new and (to me) less confusing ones. Here you have them:

Original Post: http://answers.unity.com/answers/1687958/view.html

First, download and install Texture Packer (https://www.codeandweb.com/texturepacker/download) Then import Texture Packer into the project (https://assetstore.unity.com/packages/tools/sprite-management/texturepacker-importer-16641)

  1. Put all .png files into TexturePacker (drag and drop to the software's GUI)

  2. Set the "output Files" > "Framework" to → JSON (Array)

  3. If prompted for phaser framework, go for the option "keep JSON Array"

  4. Click "Publish sprite sheet", it will export both the sprite atlas (.png) and the configuration file (.json).

  5. Add both in your assets folder in Unity.

  6. In Unity go to Window → TextMeshPro → Sprite Importer

  7. If TexturePackerImporter was added successfully into your project, the Import Format should be Texture Packer (keep this). Select the .json file for the Sprite Data Source and the .png file for the sprite atlas. After choosing these out of your assets' folder, click Create Sprite Asset.

  8. Keep the sprite atlas (.png) file selected (this is important, otherwise Unity throws a warning that you haven't chosen any files) and go to Assets → Create → TextMeshPro → Sprite Asset.

  9. Now this is important → If you select your Sprite Asset, which you'd created in the previous step, you have to make sure, that the Unicode Value in Sprite Character Table (in the Inspector) is filled (e.g.: the unicode value for 1f4a9.png should be 0x1F4A9). Usually, they are not filled automatically, which takes a bit time to enter them one by one.

  10. In the TextMeshPro (text component in the object) you must set the created TMP_Sprite asset in the "Sprite Asset" field in the "Extra Settings" section, so it is used by that component.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

229 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Same animation from multiple spritesheets 1 Answer

Missing sprites/textures? Magenta elements 0 Answers

Texture Packer vs. Sprite Packer 3 Answers

use sprites as material in 3D shader 0 Answers

Cannot add Texture to Tile Palette when Sprite Mode is Multiple 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges