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
2
Question by Essential · Nov 15, 2014 at 07:54 PM · uicanvasresize

Can I resize UI elements together uniformly?

I've been designing a UI in the new 4.6 system and then added the new Canvas Scaler component, set it to Scale with Screen Size, and set a Reference Resolution. They now scale in accordance with different screen sizes.

However, after setting the Reference Resolution it changed the sizing of all my elements. I want to resize all the UI elements I've carefully positioned and sized relative to each other — Is it possible to resize them all at once without having to do it one item at a time? If I try and resize the parent panel that contains all the elements, they don't resize uniformly and change in weird and unexpected ways.

TLDR: So, even though the canvas scales correctly now, resizing in scene view doesn't.

Comment
Add comment · Show 7
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 tayyab43 · Dec 02, 2014 at 07:40 PM 0
Share

Im having the exact same issue can anyone help?

avatar image tayyab43 · Dec 02, 2014 at 07:59 PM 0
Share

When i try and scale using the UI system but it doesn't scale or resize

avatar image Vurawid · Dec 03, 2014 at 04:42 AM 0
Share

Are you asking for a way to select multiple UI items and do something like decrease their width by half?

avatar image Essential · Dec 03, 2014 at 10:21 AM 0
Share

It was explored a bit here: http://forum.unity3d.com/threads/how-to-resize-a-ui-properly.280660/ No definitive answer was given though.

avatar image tayyab43 · Dec 03, 2014 at 05:23 PM 0
Share

in thr tutorial he says if you change the screen resolution the canvas should automatically resize in screen space overlay, it doesn't???????

Show more comments

1 Reply

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

Answer by Vurawid · Dec 05, 2014 at 08:02 AM

I downloaded the test project from the forum post mentioned: How to resize a UI properly

Made some changes and attached a modified version: UI Resize Test

Unzip, open new or existing project, then import custom package in order to check out the test scenes. Does either one do what you want?

In order to get UI objects to scale in a more expected way, the anchors need to be positioned properly. Frequently this means positioning the anchors to the corners of the object. One way to manually set anchors to the corners is to move them then set left, top, right, and bottom values to 0.

There is a previous answer with some useful code I have used that provides a menu option to snap the anchors to the corners: Anchor snap to button


ui resize test for q832528.zip (482.0 kB)
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 Essential · Dec 05, 2014 at 01:47 PM 0
Share

Vurawid, I tried downloading your modified version but there's no unity package file in the zip. I get 3 folders, each with "asset" "metaData" and "pathname" files.

avatar image Vurawid · Dec 05, 2014 at 10:10 PM 0
Share

Unsure why that's happening with the zip file. Downloaded it and looks fine on $$anonymous$$ac and Windows for me so I attached it to the forum post as unitypackage since that's allowed there.

avatar image Essential · Dec 06, 2014 at 03:44 PM 0
Share

That unitypackage worked it out. Simply an anchors issue.

If anyone is having this issue, please see both this Answer and the forum post linked at the top of Vurawid's answer.

$$anonymous$$any thanks for the help!

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

28 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

Related Questions

Animation not playing on game object activated by script 3 Answers

Unity 4.6 UI Canvas width & height 2 Answers

Custom Dropdown Sorting Order problem 2 Answers

m_TransformInfo.localAABB.IsValid() 0 Answers

pop up a canvas when the time is up 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