Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
3
Question by karlkevin · May 03, 2016 at 09:38 AM · resolutionscalescreen

How to scale everything with screen size?

@karlkevin Dear community,

I'm developing a game for iOS and Android devices, but I have faced a big problem, what is scaling. I have almost completed my game and tested on iPhone 4S, and everything was beautiful, so I decided to test on iPhone SE, and evetything is not so beautiful anymore. I have made game with camera aspect ratio 2:3, but it still zooms in everything. The buttons are in place, because I have selected "scale with screen size", so my question is is there any way to do the same "scale with screen size" to everything else- sprites, pictures etc. Or do you know even easier solution?

Thank you for your help! :)

Comment
Add comment · Show 3
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 BAIZOR · May 03, 2016 at 09:50 AM 0
Share

Do you have orthographic camera?

avatar image karlkevin BAIZOR · May 03, 2016 at 12:00 PM 0
Share

Ortographic at the moment yes

avatar image karlkevin BAIZOR · May 04, 2016 at 04:23 PM 0
Share

Any idea how to do it?

4 Replies

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

Answer by Raresh · May 03, 2016 at 10:01 AM

Clicky

Comment
Add comment · Show 3 · 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
avatar image karlkevin · May 03, 2016 at 12:46 PM 0
Share

This is for just UI elements? $$anonymous$$y UI elements scale right, but other gameobjects don't

avatar image Raresh karlkevin · May 03, 2016 at 01:39 PM 0
Share

http://answers.unity3d.com/questions/852392/scale-3d-object-according-to-screen-size-on-orthog.html

avatar image karlkevin Raresh · May 04, 2016 at 03:13 PM 0
Share

Somehow managed to make it scale, works for iphone with screen 320 x 480, 640 x 960, aspect ratio 2:3, but doesn't work with iphone tall aspect ratio 9:16. Any way to force game to this size?

avatar image
2

Answer by Natrad · Mar 20, 2019 at 09:21 AM

Hi there, the same for me. After looking around on the internet about 2 hours :(. Watching a lot of tutorials video. Finally I found the full tutorial that solve this issue. Tested and it worked for me.

Hoping that will help you. Link: https://youtu.be/2uYkom__5zo

Comment
Add comment · Show 2 · 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
avatar image Nanobrain · Apr 04, 2020 at 04:17 PM 0
Share

That voice over though Hahaha

avatar image pyreza · Jan 14 at 01:20 PM 0
Share

thank you. it work for me :))) Clear Voice version of video: https://youtu.be/oK9e-ZCDGEw

avatar image
1

Answer by pramodRamdurg · May 03, 2016 at 10:45 AM

You can do this by using screen.dpi and scaling the objects according to it.

Comment
Add comment · Show 3 · 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
avatar image karlkevin · May 03, 2016 at 12:00 PM 0
Share

What is this? Sorry, I am a real beginner

avatar image pramodRamdurg karlkevin · May 03, 2016 at 01:33 PM 0
Share

Screen.dpi will give you the density of pixel per inch of the device so using that number you have to recalculate your game objects scale.

avatar image karlkevin pramodRamdurg · May 03, 2016 at 06:39 PM 0
Share

Where should I use it? Could I just use Camera.main.aspect = floatnumber / floatnumber ? Or it won't work?

avatar image
1

Answer by ranyelvicky16 · Aug 27, 2018 at 11:19 PM

@karlkevin..did u resolve the issue? if so how? may i know ,i am also facing the same issue now on android i have developed the game on 16:9 aspect ratio.

Comment
Add comment · Show 1 · 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
avatar image Natrad · Mar 20, 2019 at 09:20 AM 0
Share

@ranyelvicky16

It works for me. Hoping that will help you. Link: https://youtu.be/2uYkom__5zo

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

10 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

Related Questions

Locking Object To Screen 1 Answer

changing the sprite scale with screen resolution 1 Answer

Scale GUITexture to screen resolutions 1 Answer

AutoScale Screen with Perspective Camera 0 Answers

How to retain absolute gameobject size in pixels no matter the 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