I had been using GUI.DrawTexture for some images before and I’m currently trying to redesign with the new GUI…
I need to create the sprite on the fly, not in the editor but they appear as if they’ve been imported compressed or possibly with mipmaps.
So I still download the png from my server and create Texture2D using
Using this texture in GUI.DrawTexture behaves exactly as I expect it to.
Now I have a panel under my canvas with an Image component which I need to set in code
gameobject.GetComponent<Image>().sprite = Sprite.Create(myTex, new Rect(0, 0, myTex.width, myTex.height), new Vector2(0.5f,0.5f));
The image this way is very blurry as if it was imported compressed as I said above… Anyone know what I’m doing wrong here?