• 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
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
3Duaun
Umai

People who like this

2 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

  • Sort: 
avatar image

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
boymeetsrobot
3Duaun
thomasw
Bovine
SolidSnake

People who like this

5 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 RAM though only a specific MipMap Level is processed in the renderer. So still the same RAM 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.

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

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

iOS falls asleep when not touching screen 1 Answer

WWW in iOS does not set user agent header 1 Answer

Getting an error in unity WebGL on IOS when trying to emit something to javascript 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