Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 aballif · May 18, 2016 at 04:32 AM · uimonodevelopguitext

GUI and UI compatibility

I am making a game and I have a coin count text. It is using a GUI text because in MonoDevelop, I am not able to make a UIText. When I try to make the public UIText, there is only and option for GUIText. Is it not called a UIText, or does my MonoDevelop have a bug?

I want to put a UI image as a child of my CoinCount Text but I can't because the GUI can't be in the Canvas and the UI can't be under a GUI object.

Comment
Add comment · Show 2
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 aballif · May 17, 2016 at 10:10 PM 0
Share

If I add using UnityEngine.UI;, will that fix the problem and allow me to use UIText?

avatar image farhanblu aballif · May 18, 2016 at 12:22 PM 0
Share

There is no such thing as UIText, its Text only, unless you are using NGUI which uses the 'UI' prefix for its widget classes.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by troien · May 18, 2016 at 08:46 AM

Unless you are using some plugin from the assetstore, there is no class called UIText :p

There is the legacy GUIText, UnityEngine.UI.Text (probably the one you want) and then there is the legacy GUI/GUILayout.Label.

If you add using UnityEngine.UI; add the top, you can use something like public Text text; to reference your text field in a script, simply drag your gameobject with a Text component to this field in the inspector and change the text by saying text.text = "yourtextgoeshere"; somewhere in your code (in Update() for example).

If you don't add using UnityEngine.UI; then public UnityEngine.UI.Text text; would do the same thing.

If you are having trouble using them. You could look at the Tutorial section, specifically the section about UI.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

UnityEngine.UI.dll 0 Answers

Check current letter in typewriter textbox? 0 Answers

How do I reference a UI text in Unity 5? (JS) 2 Answers

Changing GUI Button Script 4 Answers

ArgumentException: control 1s position in group with only 1 control 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