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 Tyrebear · Dec 19, 2013 at 02:31 AM · resolution2dtoolkitscreensizeaspectratio

2D Game Aspect Ratio Stretching And Resolution Help

I have done research about aspect ratios and resolutions however I cannot seem to understand what I need to do to make the elements in my game stretch or shrink depending on the screen size. It is kind of hard to explain so here is an image of my problem! I am developing for the mobile market and I would like my game to be universal for all platforms and aspect ratios however I do not know how to do this. Please help!!

This is what it should look like.

This is what it looks like on my phone.

what it looks like on my phone.png (275.9 kB)
what it should look like.png (425.7 kB)
Comment
Add comment · Show 5
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 thaiscorpion · Dec 19, 2013 at 02:38 AM 0
Share

That looks like the type of effect you would desire, if it were to shrink to fit the screen size it would distor everything and would make if hard to see properly. If you want to be able to view everything on the screen try increasing the 'Size' property of the Orthographic Camera until eveything you want is visible.

avatar image Kiloblargh · Dec 19, 2013 at 02:51 AM 0
Share

I've never seen a square smartphone. Are you saying you want it to be vertically letterboxed? That would suck. $$anonymous$$aybe you should limit it to landscape mode.

avatar image Tyrebear · Dec 19, 2013 at 03:45 AM 0
Share

Ok so I took your advice and limited the game to only display in landscape mode but I have another question. $$anonymous$$y phone is at a resolution of 800x480 if somebody has a different sized screen that is larger or smaller than that, will the game automatically try to fill the screen or will it letterbox? How do games that are on Google play and the iPhone market always fit to my screen because I've never seen a game or application letterbox to fit my on my phone or maintain an aspect ratio.

avatar image Kiloblargh · Dec 19, 2013 at 03:51 AM 0
Share

It will automatically fill the screen. What you can do is calculate the ratio of Screen.width to Screen.height and use that to adjust the camera FOV.

For a free-scrolling, isometric tiled game like yours, it shouldn't really matter if you can see more to the sides or more to the top.

avatar image Tyrebear · Dec 20, 2013 at 02:32 PM 0
Share

According to the unity script reference field of view is ignored when the camera is orthographic. How exactly am I supposed to calculate this? How would the script look?

0 Replies

· Add your reply
  • Sort: 

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

19 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

Related Questions

Should texture assets be created for 300dpi? 0 Answers

Setting custom resolution then take screenshot 4 Answers

Basic Questions 1 Answer

Why is the Motorola Xoom (Dual Core) slower than the Samsung Galaxy S (Single Core)? 2 Answers

Testing UI on higher resolutions than computer screen 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