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 grendayzer77 · May 09, 2014 at 01:10 PM · resolutionchangeiphone4iphone5

iPhone 4 and 5 resolution

hi, as i know iPhone 4 screen resolution (640 x 960) and iPhone 5 screen resolution (640 x 1136). i made my project on (640 x 1136) that i can change my resolution for iPhone 4 using this code : Screen.SetResolution (640, 960, true); and a condition iphone.generation

i test it on my iphone 4 and it doesn't work. any suggestion.

Thank you

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 Landern · May 09, 2014 at 01:51 PM 0
Share

Post the script to your question, also is it a iPhone 4 or 4s? and when you said it doesn't work, does that mean what exactly, what resolution did you end up with? Does it default out?

1 Reply

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

Answer by grendayzer77 · May 09, 2014 at 02:28 PM

  function Start ()
 {
     Screen.SetResolution (640, 960, true);
 }
 
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 grendayzer77 · Jun 05, 2014 at 05:01 PM 0
Share

It works but i had to resize the camera. this is the code i used. Hope it can help others.

 function Start()
 {
     if (Screen.height == 960)
     {
         Screen.SetResolution (640, 960, true, 60);
         camera.orthographic = true;
         camera.orthographicSize = 4.78; // it depends of camera seize
     }
     
     else if (Screen.height == 1136)
     {
         Screen.SetResolution (640, 1136, true, 60);
         camera.orthographic = true;
         camera.orthographicSize = 5.68; // it depends of camera seize
     }
 }

 

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

21 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

Related Questions

iPhone5 resolution 0 Answers

iphone4s app width is not adjust in iphone5 0 Answers

working with retina display, new game 1 Answer

Game View Resolution Different from iPhone5 Device Resolution 0 Answers

Change Screen 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