Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 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 Stalker91 · Aug 24, 2016 at 05:31 PM · androidunity 5canvasresolutionscaling

Unity 5.3 canvas scaling - Android

I have set a canvas property UI Scale Mode to Scale With Screen Size, set reference resolution to 720x1280 and put an image on canvas. When i tried an app on device, i saw that image doesn't fit the screen. It seems everything is ok with width, but image doesn't fit in height. How can i fix this?

alt text

alt text

1.jpg (14.6 kB)
2.jpg (12.6 kB)
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

2 Replies

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

Answer by Stalker91 · Aug 26, 2016 at 05:51 AM

I solved this problem. Actually, the best solution is to set anchors for all controls/objects on canvas to be custom. First set it to stretched and after that just move pointers to the all vertices.

alt text


1.jpg (5.7 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
avatar image
0

Answer by JuliaYamamoto · Aug 24, 2016 at 08:11 PM

hmmm... Did you tried to set the Match to 0.5? (on the Canvas Scaler Component)

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 Stalker91 · Aug 24, 2016 at 09:48 PM 0
Share

I tried it now but, as i expected, it is not a solution. $$anonymous$$atch property applies on both properties, width and height, and i need it to apply only on height.

avatar image JuliaYamamoto · Aug 24, 2016 at 09:57 PM 0
Share

I see... change the scrren match to mode to expand works? (nevcer used)

btw, did you set the pivot and position of your image to Strech? (on the rect transform component)

avatar image Stalker91 · Aug 24, 2016 at 11:10 PM 0
Share

I set the image to be stretched and now everything is ok with image, but i have a problem with buttons. I put one of them on image about 100 px from image bottom side, but when i test it on device, this button is much closer to bottom side of image as it is not 100 but 30 px. I see that i should set button position to be relative with regard to image and not to canvas, but how to do it?

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Builded game for android resolution scruwed 0 Answers

UI not scaling correctly with screen resolution 1 Answer

Android resolver failed at build 0 Answers

Unity Android fetching wrong screen resolution 1 Answer

How to set mobile control and scale in size in android setting? 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