以下の内容はhttps://nakamura001.hatenablog.com/entry/20141005/1412517203より取得しました。


RectTransform プロパティの width や height の値をプログラムから変更する方法

RectTransform の sizeDelta に値を設定する事で width や height の値を変更可能です。

RectTransform rt = UICanvas.GetComponent (typeof (RectTransform)) as RectTransform;
rt.sizeDelta = new Vector2 (100, 100);

参考情報

Modify the width and height of RectTransform | Unity Community
http://forum.unity3d.com/threads/modify-the-width-and-height-of-recttransform.270993/




以上の内容はhttps://nakamura001.hatenablog.com/entry/20141005/1412517203より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14