I’m trying to make a screenshot and use it for transitions. The code below works fine in Unity Editor and on iPhone6s, however, on iPad2 it produces vertically stretched sprite. The sprite on iPad looks like if its scale by Y is 1.2 or so. Texture size is 1024x768, game object transform has scale 1, RectTransform.rect as well as Canvas.rect shows (x:0.00, y:0.00, width:1024.00, height:768.00). I tried to make smaller textures (half screen etc), they are also stretched. Any thoughts?
Texture2D tex = new Texture2D(Screen.width, Screen.height);
tex.ReadPixels(new Rect(0,0,Screen.width,Screen.height),0,0);
tex.Apply();
GameObject go = new GameObject("Screenshot");
RectTransform rectTransform = go.AddComponent<RectTransform> ();
Image image = go.AddComponent<Image> ();
image.sprite = Sprite.Create (tex, new Rect (0, 0, Screen.width, Screen.height), Vector2.zero);
rectTransform.sizeDelta = new Vector2 (Screen.width, Screen.height);
go.transform.SetParent (myCanvas.transform);