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 Bovine · Jun 26, 2012 at 07:14 PM · iosresolutiontargethardwaredifferent

Target Different Resolutions on iOS

Hi All

We are writing a dungeon crawler for iOS with Unity - we're using per-pixel lighting and it's all running fine on 3G S and iPhone 4S at the native res. Not surprisingly, it runs at an unacceptable speed on the latest gen iPod touch and iPhone 4, clearly down to the fact that 4x the pixels is a real killer. We've tried it with very simple diffuse shaders and we're not drawing huge amounts in our recent test - about 15K polys, around 4 or 5 materials, about 25 draw calls - we're static batching maybe 20 calls typically and we are using occlusion culling. We have a few particle effects, but these are using simple shaders and we typically have about 8 particles per emitter, so we didn't ought to be killing the performance and turning these off doesn't appear to make any difference.

In this scenario, I'd clearly like to target the higher res for the 4S, iPad 2 and iPad [3], but go with the lower res on the older devices with the high res screen - I don't especially want to be releasing a HD version and a SD version, although I guess it is an option, but in the case of the HD version, I'd need to ensure it didn't run on older hardware with the higher res.

I've had a play about in the XCode project, as it ought to be possible to make a change there that would target both, but it's not entirely obvious to me where the resolution is being taken from - but before I dive in too deeply, I thought I'd ask if anyone else had solved this problem?

Thanks a lot Bovine

Comment
Add comment
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

2 Replies

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

Answer by whydoidoit · Jun 28, 2012 at 10:20 AM

You can do that no problem :) I asked the same question a few days ago and ended up having to work out the answer myself. It's all listed out here. Basically you change the XCode project to detect an iPhone 4 and then change the CreateSurface code - anyway, full code in the link provided.

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 Bovine · Jun 28, 2012 at 10:33 AM 0
Share

Thanks!! Looks like exactly what I needed to do!

(how's that serializer co$$anonymous$$g along $$anonymous$$ike?)

avatar image whydoidoit · Jun 28, 2012 at 04:33 PM 1
Share

Version 0.8 just released. Getting there... Another 3 or 4 weeks to v1

avatar image
1

Answer by Mortoc · Jun 26, 2012 at 08:56 PM

You could build twice. Make a build script that makes one build for iPhone 4 at Standard Resolution and one for iPhone 4s at HD. Your build time would increase, but you wouldn't have to support code changes in the generated XCode project (which I assume would be a nightmare to maintain).

Comment
Add comment · Show 4 · 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 Bovine · Jun 28, 2012 at 09:51 AM 0
Share

Yes, but that would mean releasing a HD version and an SD version - I also read something that suggested Apple have clamped down on that kind of release strategy, but I've not had time to substaniate that view... it's a cheap solution if that happens to be the workflow I follow.

avatar image whydoidoit · Jun 28, 2012 at 10:22 AM 1
Share

It's not hard actually that hard to maintain the XCode project as it's only a few lines of code. It's also probably possible to create a post build script to do it for you.

avatar image Mortoc · Jun 28, 2012 at 04:32 PM 0
Share

The answer below is actually not as bad as I had thought it might be, I'd go with whydoidoit's answer.

avatar image Bovine · Jun 28, 2012 at 04:59 PM 0
Share

Yeah a post build step to fixup the CreateSurface() method sounds good tbh. I'll worry about it a little later though now - It would be useful if resolution could be deter$$anonymous$$ed on a per platform basis...

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

Duplication of the scenes for different resolutions ? 1 Answer

iOS target resolution does nothing? 0 Answers

iOS hardware limitations. 1 Answer

Random.seed on different hardware? 1 Answer

How to test iPhone's resolution in iPad? 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