Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Articulation of Texture2D.LoadImage

Discussion in 'Scripting' started by jehovah0121, Aug 4, 2014.

  1. jehovah0121

    jehovah0121

    Joined:
    Sep 28, 2011
    Posts:
    17
    I use load a png file from the disk as a byte array, and use Texture2D.LoadImage() to pass the image data to a texture. At last I use GUI.Label() to draw it on the screen.

    When I run the code in the editor, the image is well displayed. But building the game to a device (like iPad4) the image looks very blurred. Could anybody tell me why is that, please?

    Thanks.

    (wrap mode: clamp, filter mode: bilinear)
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,936
    what resolution the image is and what size your label is?
     
  3. jehovah0121

    jehovah0121

    Joined:
    Sep 28, 2011
    Posts:
    17
    The size doesn't matter. The thing is that when you new a Texture2D, it by defaults creates mipmaps on real mobile devices unless you explicitly turn it off. And we scale the image also, which makes the problem worse. :)