Unity3d 4.6 UI image error on some Windows 8 and 8.1

I am making an interactive book for Windows users and I am using the 4.6 UI system. I tested my application on many computers using different versions of Windows. It works fine with windows xp, windows 7, windows 8 and 8.1. But some of the computers with windows 8 and 8.1 create a strange error.

Here's how it should look like

http://imgur.com/QXmeTIJ,PdQfrQb

and here it is in windows 8

http://imgur.com/QXmeTIJ,PdQfrQb#1

Btw I have many images in my application. I put them in my project with the extension .bytes and creating a sprite at runtime. My code for this:

   void TextAssetToSprite(int pNo)
 {
     TextAsset tmp = textAssetArray[pNo] as TextAsset;
     Texture2D imgTexture = new Texture2D(1, 1);
     imgTexture.LoadImage(tmp.bytes);
     Rect rectangle = new Rect(0, 0, imgTexture.width, imgTexture.height);
     Vector2 pivot = new Vector2(0.5f, 0.5f);
     Sprite firstSprite = Sprite.Create(imgTexture, rectangle, pivot);
     imageControl.sprite = firstSprite;

     tmp = null;
     imgTexture = null;

     Resources.UnloadUnusedAssets();
 }

, . , . , , , , png-, . , . .

+4

All Articles