Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Pixel-Widget · Aug 20, 2016 at 09:40 AM · cameraspriteresolutionaspect ratiopixels

Unity 2D: Pixel Perfect Camera + Resolution Help

Hello, I am aware that there are many guides and questions relating to pixel perfect sprites in Unity, but I have not found an answer that fixes my problem.

While I am able to create a pixel perfect setup for one resolution, if I change to full screen or want to change the window size (while maintaining the same aspect ratio) I am unable to do it successfully.

Many answers are to alter the orthographic camera size according to the dimensions of your screen, but this also changes how much of the scene can be viewed in the window. Unfortunately, this is not an option for my game as regardless of the resolution, the same game area must be able to be seen.

What I need: To be able to change window sizes within a particular aspect ratio (4:3) and keep pixels square (without stretching), while not altering the orthographic camera size as the same area of the game must be viewable regardless of window size.

If I was unable to properly explain my problem or if anyone needs clarification, just ask.

Any replies/suggestions are welcome.

Thanks.

Comment
Add comment · Show 2
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 Cherno · Aug 20, 2016 at 01:32 PM 2
Share

There is a freet asset called PixelPerfectCamera, have you checked it out?

avatar image Pixel-Widget Cherno · Aug 20, 2016 at 07:27 PM 0
Share

Hello, thank you for the reply, after working with the script, I was able to achieve what I needed. Thanks.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Sprite Scale when change Camera orthographic size 1 Answer

2D Aspect Ratio Of Camera 2 Answers

Sprite Image size for different mobile resolutions 0 Answers

Resizing orthographic camera to fit 2d sprite on screen 1 Answer

Same visible area with every resolution 2 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