UnityのUGUIのRectTransformでleft,right,top,bottomをスクリプトから変更する
gameObject.GetComponent<RectTransform> ().offsetMin = new Vector2 (left,bottom);
gameObject.GetComponent<RectTransform> ().offsetMax = new Vector2 (right,top);
gameObject.GetComponent<RectTransform> ().offsetMin = new Vector2 (left,bottom);
gameObject.GetComponent<RectTransform> ().offsetMax = new Vector2 (right,top);