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 /
This question was closed Apr 25, 2018 at 11:52 PM by S_jay1 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by S_jay1 · Jan 18, 2018 at 06:24 PM · guitextgame

Is the GUI text still viable?

I want to create a text to display the score for my game and the space shooter tutorial uses a GUI text to do so, but it has the message "This component is part of the legacy UI system and will be removed in a future release." So should I use this or is there a better alternate solution? And what is the difference between normal text and GUI text?

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

  • Sort: 
avatar image
1
Best Answer

Answer by Pinkuboxu · Jan 19, 2018 at 10:07 PM

I'd think of it like, as long as your score is in a variable then you just have to change it later when you have to. I'd worry about fixing it after you finish the tutorial. It will probably still work for some time. So learn now, don't get too paranoid about deprecation until you are making a commercial product. ;)

But when you get there you need to be "using UnityEngine.U"I and a Text type which can hold the new GUIs Text Component. Usually you start by just creating a Canvas with a Text component, either in the editor or procedurally. GetComponent to reference it (or make it public and set it in the inspector) and use its .text property to change what it displays.

Oh, and to answer the last part, I think it's the difference between the new GUI system and the old way. I don't have much experience with the old way though.

Comment
Add comment · Show 3 · 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 S_jay1 · Jan 20, 2018 at 01:46 AM 0
Share

Thank you for the reply! Just a quick question, what does "using UnityEngine.U"I mean and how would I add/use that?

avatar image Pinkuboxu S_jay1 · Jan 20, 2018 at 06:43 PM 0
Share

The C# "using" keyword in general is so you can use namespaces from other code in your project, without having to constantly type the whole namespace in. It's what the "using UnityEngine" is for. There are a lot of these namespaces both in Unity and for the standard C# language. The "UnityEngine.UI" (I didn't catch the wonky typo, sorry) it's the namespace for all the GUI stuff in the newer system. So you can define and reference objects without having to type "UnityEngine.UI" before every method or other class use. I hope that's what you where needing. Forgive me if I'm assu$$anonymous$$g, but have you done any plain .NET C# coding tutorials? This will help you immensely in understanding the C# language and it's implementation in Unity.

avatar image S_jay1 Pinkuboxu · Jan 21, 2018 at 03:14 PM 0
Share

I've started using Unity a couple months ago and I'm trying to learn some C# coding while creating a game, so I'm still unfamiliar with a lot of the terms used in C#. Thank you for the clarification though!

Follow this Question

Answers Answers and Comments

77 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

Related Questions

GUI HELP!!!!! 1 Answer

Level Button And Quit Button Android 2 Answers

help with Gui texts 2 Answers

In Game player message - GUIText or something else? 1 Answer

I need help with my GUI text for my Real Time Strategy Game 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