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 /
avatar image
0
Question by Benedikt_Zoeller · Mar 17, 2020 at 10:15 AM · textconversionhex

TMP / Unicode | how to use unicode-combinations?

Hello Community. I'm working on a chat for our game and we would like to support emojis. We use Textmesh Pro to do so. however, various emojis use multiple hexnumbers to function properly like "1f1e6-1f1ec" but adding this value into Sprite Character Table Item in the Sprite-Asset turns it into 66F1F1EC and I'm not sure if that is correct. Additionally, I want to add the unicode via script since setting the unicodes of thousands of emojis by hand would be madnes. however, converting it into a uint doesn't seem to work.

 UInt32.TryParse("1f1e6-1f1ec", System.Globalization.NumberStyles.HexNumber, null, out unicode) => returns false

Do I have to change the string befor trying to convert it or is this simply not possible?

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
0

Answer by Bunny83 · Mar 17, 2020 at 01:03 PM

The two Unicode code points 1f1e6 and 1f1ec do not really represent an emoji. They are just "regional indicator symbols". In your case it's AG which is the regional code for "Antigua and Barbuda". As you can read here only

Some Emoji implementations represent combinations of two “regional indicator” letters as a single flag symbol


However from a unicode point of view those are just two seperate characters representing "A" and "G". So the usual display of that combination is just AG and not necessarily a single flag symbol. That's just a convenient interpretation by some unicode renderers but not really in the standard and not required.


Note that A and G are just part of a special character set (A-Z) in the unicode standard which should only be used for regional codes. Therefore a unicode renderer can choose to preplace those two characters by a known replacement (usually the country flag). However for example my Firefox does not display a flag symbol but just the two letters "A" and "G"


I guess that TMP and the corresponding fonts used just don't do those replacements.

Comment
Add comment · Show 1 · 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 Bunny83 · Mar 17, 2020 at 01:09 PM 0
Share

ps: UnityAnswers did not allow me to actually use the unicode letters we just talked about. UnityAnswers didn't allow me to include the actual unicode characters. $$anonymous$$aybe we can use html escapes: 🇦🇬


edit yes that worked ^^. However as I said my browser does just display and "A" and a "G" for 🇦🇬

avatar image
0

Answer by Benedikt_Zoeller · Mar 17, 2020 at 02:09 PM

I actually got a similar result when trying to add the uint of the two unicodes together (just trying weird things out). I converted the unicodes separately (in my example 1f1e6 and 1f1ec), added them together and now, Emojis that consist of more than one icon are being portrayed with a fitting combination of Emojis. Doing this for flags shows two letter-emojis representing the regional indicator for the flag. Trying to use a emoji with a darker skin-tone adds the yellow version of the emoji and a single-color emoji of the desired color.

I'm not sure if this means i'm going in the right direction or that TextMesh Pro doesn't support combining different Emoji-Unicodes.

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

129 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

Related Questions

Custom text shader in Strumpy Shader Editor 0 Answers

GUI Text not displaying in my game space 2 Answers

A text apears on the screen when you enter a trigger 1 Answer

Gui text component on an object not showing up? 0 Answers

Having proper text areas in unity? 0 Answers


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