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
2
Question by Woj_Gabel_FertileSky · Jan 09, 2012 at 12:21 PM · guiresolutionaspect-ratiodifferent

adjust camera or view to different resolutions

Hi! I'm trying to make a level chooser scene in my project, but cant get around different aspect ratios. Now the problem is not with textures in GUI(at least not yet :)) but with camera, or field of view. My screen is divided in two sections. GUI is on one side, and 3d objects are on the other side. In editor I'm working in 5:4 ratio, but when changed to, say, 16:9 all my objects, that were filling all desired space in 5:4, are now cramped near center of the screen due to more screen space on both sides. Now is there a way to fix this? I know i can get the right-most object in the scene, get its screen position and adjust camera position. Pseudocode:

 (if (object.Screen.position<Screen.width)
 {move camera until object.Screen.position+10 >= Screen.width}

But moving camera to the right will increase empty space on the left, so that is not the best way to do this. I could bring camera forward, but then my ""level objects" will go out of view on top and bottom. There is this way to do this:

http://gamedesigntheory.blogspot.com/2010/09/controlling-aspect-ratio-in-unity.html

But i dont want to crop the view space. Is there a way to do this?

5:4 Aspect ratio is ok. Objects fill desired space.

16:9 aspect ratio: Free space on both sides. What to do?

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 Next Beat Games · Nov 24, 2013 at 10:44 PM 0
Share

no answers so far? I'm faced with a similar issue

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by bompi88 · Nov 24, 2013 at 11:18 PM

Take a look at this blog post, maybe it helps.

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

6 People are following this question.

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

Related Questions

How to GUI Resize and Reposition accordingly to AR and Resolution? 0 Answers

ASPECT RATIO FILTER IN OnGUI? 3 Answers

Menu screen for different resolutions 1 Answer

Resize NGUI at Run Time 1 Answer

GUI Texture problem with it's 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