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 HolBol · Oct 22, 2010 at 10:13 AM · guiscreenguitext

Get GUI Text Object to appear in the top left corner of the screen.

How can i keep the GUI Text component of a GameObject in the top-left corner of the screen? And no, I do not want to use GUI.Label (unless you can show me how to use a different font and material for it, i haven't been able to find this in the scripting reference at all,). So, some pointers on how to do this will be much appreciated.

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 Tobbe Olsson · Oct 22, 2010 at 06:09 PM 0
Share

I started out not knowing scripting or coding at all a few months ago, and this type of question is one of the easiest to just find in the documentation, or through google. This place takes up peoples' time, I think more people should respect that. There's a chance it will get too cluttered and people won't bother going here and answering people's questions anymore. You got 71 questions in your history, most of them very basic.

Don't take offense, try to find out for yourself first that's all I am saying!

avatar image HolBol · Oct 22, 2010 at 07:16 PM 0
Share

Don't take offense = You're gonna offend me. Well done. I have tried looking, and i have not found anything. I know, it's a simple question, which is why i just need a simple answer. I have explained as much as i can and no one has answered.

3 Replies

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

Answer by Molix · Mar 03, 2011 at 06:01 AM

After using GameObject > Create Other > GUI Text, change the object's Transform position to (0, 1, 0). The text will be in the upper left corner and stay there through resizing, etc.

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 kenneth0209 · Aug 12, 2013 at 08:31 PM 0
Share

Thank you.

avatar image
0

Answer by GameGuy · Oct 22, 2010 at 02:30 PM

function OnGUI () {

 GUI.Box (Rect (0,0,100,50), "Top-left");

}

Try the Gui-Basics in the Manual http://unity3d.com/support/documentation/Components/gui-Basics.html

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 HolBol · Oct 22, 2010 at 04:29 PM 0
Share

This hasn't moved my GUIText GameObject to the corner of the screen at all, just drawn a box there. You know, as in one of the guitext objects you make form GameObject > Create Other > GUI Text?

avatar image GameGuy · Oct 23, 2010 at 02:04 PM 0
Share

Youre right, this code is for a button! I use it with Gui.Label and it works for me, and of course you can change the font of the Gui.Label check out Assets>Create>GuiSkin

avatar image
0

Answer by Waz · Jun 27, 2011 at 05:04 AM

To change the font of a GUI.Label, all you do is modify the GUI.skin you are using, either by changing the Label style in it, or by adding a custom style, then using that for your label.

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

2 People are following this question.

avatar image avatar image

Related Questions

How to set the position of a guitext using transform? 1 Answer

Scrolling Text 1 Answer

How can I get a UI Panel's size in relation to the screen size? 1 Answer

Make my HUD full screen 2 Answers

How do I build a GUI that works on different sized screens? 3 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