Search Unity

Texture Cache (Retina)

Discussion in 'iOS and tvOS' started by x10z, Sep 5, 2011.

  1. x10z

    x10z

    Joined:
    Aug 18, 2009
    Posts:
    54
    Hi there everyone,

    I'm finishing my new game for the iOS *WOOOHOOOO*

    I'm just trying to find out the best way to deal with retina/sd graphics.

    It's a 2d game. I have the whole game textured in sd. In order for me to have it on retina I just have to swap mainTextures on materials. My question is , holding a reference in a script to a texture , makes the device have the texture on memory or is it just a pointer ?

    I can have two arrays (one for sd textures , other for retina textures) in a script and based on the device , have it swap the texture in Awake. But I would not like to have an iPhone 3G holding a 2048*2048 texture!

    What do you guys suggest ?

    Thanks in advance!
     
  2. qamarzaman

    qamarzaman

    Joined:
    Jul 1, 2010
    Posts:
    85
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    And a better way is to just use retina graphics :p its the same hardware for graphics. The 3GS is faster than the retina device and the ipad. So scaling down doesn't make sense nor any of this. You can let mip mapping deal with it or in most cases even disable mip mapping.

    Or just apply materials without textures then Resources.Load the textures for the materials at awake.

    In short, the only reason you would want to do this within reason is if it doesn't look quite as polished when scaling down to the lower res.

    Thats true enough, just noticed you were targetting this dead device that will have little to no impact on your sales :)