Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 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 Victor_S · Jan 28, 2015 at 11:21 AM · guibuttoninterfacelabel

GUI.Label positioning for many device resolutions

Hi, I'm very new to Unity. I bought source code of 2d game where ui interface is hardcoded in this way: GUI.Label (Rect (190,2,40,40), "", "blankchip");

I want to make ui to look good on different devices. For example, I want ui element to be in top right corner of the screen. How can I do it? Thanks

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 gjf · Jan 28, 2015 at 10:58 AM 0
Share

you'll need to do one of the following:

1) convert the ui calls to something like the new ui system in unity 4.6 or buy some other ui system like ngui - it's what some of the cool kids are using ;) there are tutorials and lot of people here to help if you try it yourself first.

2) contact the author of the code that you purchased and ask whether they are going to update it (if they haven't already)

in the long run, 1) will be better for you - it'll be a good learning experience and allow you to get to know unity.

if you have unity 4.6 then look at the learn section - it'll get you started.

please, in future, when you post code, use the code tags (highlight the code section and click on the 101/010 button)

avatar image Victor_S · Jan 28, 2015 at 12:49 PM 0
Share

Thanks, I'll try your solutions

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by thef1chesser · Jan 28, 2015 at 11:45 AM

There are the ways mentioned by gjf where lokking in unity 4.6 UI system would be very interesting.

There is a 3rd way. Convert it to a percentile and let it calculate where it should be on the x and y screen coordinates using the used screen resolution.

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 Victor_S · Jan 28, 2015 at 12:48 PM 0
Share

Thanks, could you please give me a start point of how to "convert it to a percentile".

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

GUI, making main page lead into an instructions page 2 Answers

Creating a component from a button click 1 Answer

GuiMatrix ? 1 Answer

4.6 UI callback variable 1 Answer

GUI.Label appearing behind GUI.Button 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