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!

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.