Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var imageRect = image.GetComponent<RectTransform>();
- imageRect.anchorMin = Vector2.zero;
- imageRect.anchorMax = Vector2.one;
- imageRect.anchoredPosition = Vector2.zero;
- imageRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal,Screen.width);
- imageRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical,Screen.height);
Advertisement
Add Comment
Please, Sign In to add comment