newrect.anchorMin = new Vector2(0.5f, 0); newrect.anchorMax = new Vector2(0.5f, 0); newrect.pivot = new Vector2(0, 0);