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
-1
Question by Detinator10 · Aug 09, 2014 at 04:09 PM · cameraaspect-ratio

Why does my game have letterboxes on the side?

I hit build and build and run for my 2D game in unity but when I play it there are letterboxes on the side. It happens in the built in player too. I have the aspect ratio set to 16:9 which I'm pretty sure is wide-screen but it still shows the letterboxes. Why is this happening? BTW I'm using a 1366 x 768 display I think

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 tanoshimi · Aug 09, 2014 at 04:36 PM 0
Share

Well, what resolution display are you using?

avatar image Detinator10 · Aug 09, 2014 at 04:44 PM 0
Share

I think it's 1024 x 768 but I'm not sure.

avatar image tanoshimi · Aug 09, 2014 at 06:06 PM 0
Share

Well, that's a 4:3 aspect ratio, which explains the letterboxing...

avatar image Detinator10 · Aug 09, 2014 at 06:35 PM 0
Share

Actually I'm pretty sure it's 1366 x 768.

avatar image Graham-Dunnett ♦♦ · Aug 09, 2014 at 08:54 PM 0
Share

Use http://docs.unity3d.com/ScriptReference/Screen-currentResolution.html to get the resolution your game is actually running in. In the editor it's likely that your game window isn't 16:9, and Unity has found a 16:9 resolution that does fit inside the game window.

1 Reply

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

Answer by Detinator10 · Aug 12, 2014 at 10:00 PM

It turned out that it just does that in the editor. However, in the real game (build and run) I simply set the default screen resolution to 1366 768 instead of the automatic default of 1024 768. I think the option for default screen res was in build settings.

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

22 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

Related Questions

the unity aspect ratio script looks good in computer but not in android phones 0 Answers

Why is the camera aspect ratio broken for the game tab? 0 Answers

Ortho camera viewport setup? 3 Answers

2D Camera Script 2 Answers

How to adjust desired camera size for all aspect ratios without having black edges? 0 Answers


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