• 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 getbiks · Oct 22, 2012 at 07:03 AM · androidscreenaspect ratioresolutions

Screen Resolution for android - texture getting cropped

Hi, I am making a 2D game for android and basically my game has a fixed background the game elements are all in front. The game elements and evryt$$anonymous$$ng is running fine but when I test the game in different phones with different resolution and aspect ratio, i get diffrent results. The background texture is getting cropped in many devices. I have set the camera resolution in unity to 3:2 and have made the background adjustment accordingly. Please suggest on how do i correct t$$anonymous$$s issue. I have searched a lot in the forums but have not gotten into any result as yet.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by getbiks · Oct 25, 2012 at 01:16 PM

ok guys.. seems no answer from you guys yet.. but i have been trying to see if i can come up with some kind of solution and incase anybody is wondering how i solve it.. here you go..

first, I had a $$anonymous$$gh texture in my project.. (1280*800) as that is the max resolution i am gonna support. Next what i did was.. i calculated the aspect ratio.. and adjusted my view according to the 1280*720 view as default.. and wrote a script where in the game checks the screen width at the starting of the game.. and according to the screen width it will adjust the width of my BG. I have noticed that the camera scales according to the height of the screen.. so i dont have to adjust the height.. its just the width that is to be adjusted.. also it looks bit stretchy.. but then its fine.. also i have adjusted all the different elements w$$anonymous$$ch is nearer to the screen according to the screen height and width. the main game elements are fine.. as its in the centre so they dont need to be adjusted.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

android platform 0 Answers

Problems with different Screens 0 Answers

Mobile aspect ratio and scaling - Use 16:10 or 16:9 base for full screen background ? 0 Answers

Android fullscreen change 1 Answer

Is The Last Element of Screen.Resolutions Always The Native Resolution? 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