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
2
Question by TimYanalunas · Sep 29, 2010 at 12:26 AM · iostextureiphoneresolutionipad

Dynamically choosing a high resolution texture at runtime on iOS devices

I am developing an iOS game that is designed to run on the iPhone 3GS, iPhone4, and iPad.

Does Unity provide a method to load higher resolution textures for the iPhone4/iPad and lower resolution textures for the 3GS? I'm basically looking for something similar in functionality to the "@2x" feature that Apple's UIKit provides. Ideally, this solution would work for both model textures and UI textures.

I could just use all high resolution textures, but then I would have to worry about the smaller RAM size on the 3GS. So, I'm looking for a more robust solution.

Thanks!

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 Umai · Dec 29, 2014 at 02:47 AM 0
Share

How did you solve this? For 2D games, this is a very apparent issue.

1 Reply

· Add your reply
  • Sort: 
avatar image
5

Answer by Mantas-Puida · Sep 29, 2010 at 09:05 AM

For model textures you just have to:

  • enable mip maps on textures
  • configure Quality Settings (Edit->Project Settings->Quality). Make one quality setting to use full res textures and one to use half res textures
  • make a script that gets executed on first game scene startup: check device model there and assign current quality setting according to it.

Sample code:

function Start () {
    if (iPhoneSettings.generation == iPhoneGeneration.iPhone4)
        QualitySettings.currentLevel = QualityLevel.Good; }

For GUI stuff mip maps are not desirable and in this case Resources.Load is your friend.

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 TimYanalunas · Sep 29, 2010 at 03:56 PM 0
Share

Thanks, that seems very simple! I'll give it a try.

avatar image synapsemassage · Jul 14, 2011 at 07:44 PM 0
Share

I believe that still the highest resolution texture is loaded into RA$$anonymous$$ though only a specific $$anonymous$$ip$$anonymous$$ap Level is processed in the renderer. So still the same RA$$anonymous$$ usage?!

avatar image Umai · Dec 29, 2014 at 02:45 AM 0
Share

Sorry to be late to the party but is there (STILL) no other way to load 2D assets that are right for each screen resolution than Resources.Load? This should clearly be the job of Unity.

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

2 People are following this question.

avatar image avatar image

Related Questions

Setting resolutions for iPad and iPhone 0 Answers

apple rejected app due to iphone & iPad resolution mismatch 1 Answer

Low frame rate with only one texture on iPad 4 Answers

Detecting an iPhone app running on an iPad 1 Answer

need help launching game to app store 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