mardi 19 juillet 2016

Unity - Generated sprite not visible on iOS

currently i'm downloading an image from web via WWW. That works perfect for all targeted platforms excepting iOS. On iOS the image appears just black.

Here is the code:

public void receiveData(WWW receivedData)
{
    image.sprite = Sprite.Create(receivedData.texture, new Rect(new Vector2(0,0), new Vector2(50, 50)), new Vector2(0.5f, 0.5f));
    image.color = Color.white;
}

I've been trying around for some time now without any results...
F.E. i tried to change the format of the texture with textureFormat or creating a new Texture2D and changed the pixel. But all results in a black image. Does anyone have an idea what the matter is?

Best Regards

Aucun commentaire:

Enregistrer un commentaire