Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 zharik86 · Jan 10, 2014 at 08:49 PM · guiunicodeguilabelsymbols

GUI.Label with down symbols

Good afternoon. By application programming I had a question. How to display the lower characters in one GUI.Label ()? For example, I want to see a water formula on the screen: H2O where number 2 - is see as the lower character. Thanks in advance for the help.

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

1 Reply

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

Answer by Eric5h5 · Jan 10, 2014 at 09:03 PM

Subscript numbers exist as Unicode characters, so you can type it in as text: H₂O. (On OS X, use the character palette with Symbols -> Numbers and Number Symbols.)

Comment
Add comment · Show 6 · 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 zharik86 · Jan 11, 2014 at 09:08 AM 0
Share

@Eric5h5 If it isn't difficult for you, you could give an example of use of it in GUI.Label (). And as I understand, the coding of the file shall be utf-8.

avatar image Eric5h5 · Jan 11, 2014 at 06:48 PM 0
Share

There's not really any example to give since there's nothing different from normal. It's just text. Find any example of GUI.Label that exists and plug it in. You should use UTF-16 if using C#. UTF-8 only seems to work with Unityscript.

avatar image zharik86 · Jan 11, 2014 at 07:54 PM 0
Share

@Eric5h5 Unfortunately it is impossible to me a little. For example(I write in CSharp):

  GUI.Label(new Rect(0, 0, 100, 50), "H\u2082O");

Here '\u2082' value of the character lower 2 in Unicode. But unfortunately, on the screen at me an output: "H₂ O". For some reason for the lower characters 1, 2, 3 and 4 there is superfluous a distance, and for the remaining is normal (I use the Arial font). And how to me to make the lower characters if I there have a text?

avatar image Eric5h5 · Jan 11, 2014 at 11:33 PM 0
Share

Try using a different font. I couldn't understand your last question.

avatar image zharik86 · Jan 12, 2014 at 07:41 AM 0
Share

@Eric5h5 I use a font in unity by default (difficult to tell how it will be displayed on android the device). But I will try other fonts. Concerning the last question. For example, I display "Hello$$anonymous$$yFriend" text. And I want that the word "$$anonymous$$y" was displayed also, as well as number 2 in a water formula H₂O .

Show more comments

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

19 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

Related Questions

Umlaut shown as ?? in GUILayout.Button 3 Answers

GUI Text to GUI Label Script? 1 Answer

Polish letters in GUI - saving with UTF8 is not working 1 Answer

How can I use iTween library to fade in a GUI.Label? 1 Answer

GUILabel wider than Rect width 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