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 siddharth3322 · Jan 22, 2014 at 02:43 AM · buttonmenunguiunity4.3

Placing button at corner using NGUI

Currently I am using NGUI for menu creation. In that I want to place my back button in top left corner of the screen. I have problem regarding this. Currently I am focusing on 1920x1080 resolution but when I switch to another resolution say 480x320 then my back button goes out of the screen. So I want some tips in this. Please help me in this because I already spent half day to come out of this.

Comment
Add comment · Show 1
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 GameVortex · Jan 22, 2014 at 08:39 AM 0
Share

Example 1 - UI Anchor scene which comes with NGUI demonstrates how to that.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by moghes · Jan 22, 2014 at 08:49 AM

Attach a UI Anchor component to your button , go to the "side" dropdown and select bottomRight or buttomLeft depending on where you want, also play with the relative offset to indent from borders.

Not that if you are using the latest version of NGUI (i think 3.0.6 or newer) there's a new anchoring system where you can anchor any widget or panel relative to its parent.

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 siddharth3322 · Jan 25, 2014 at 07:21 AM 0
Share

Thanks for you reply. At present I can able to get button at corner position in all resolution but it remain in same size regardless of the resolution change. What to do in this situation? If you want more information then I am ready to provide.

avatar image
0

Answer by siddharth3322 · Jan 27, 2014 at 02:12 PM

First of all you have to add button from widget tool. Then remove Background sprite from it and attach sprite into button widget. Then set anchor of your UISprite component as per the following image.

alt text

Above image value set button widget at the bottom left corner. Anchor system become most useful to handle position and scale of widget as per resolution change.


bottomleftbutton.png (8.2 kB)
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

20 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

Related Questions

Setting Background using NGUI 0 Answers

Toggle Button for Sound On/Off 1 Answer

Know Which Button is Clicked 0 Answers

Sliding sub-menu from behind an icon 0 Answers

nGUI how to deactivate UICheckbox by script? 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