title: How to modify RectTransform properties in script [Unity 4.6 beta]
body: <p><img src="https://i.stack.imgur.com/ynLyC.jpg" alt="enter image description here"></p>
  
  <p>Hello, I'm using the new UI system from Unity 4.6 beta...</p>
  
  <p>Tried different codes, looked at the docs and searched around but can't find the answer…</p>
  
  <p>For example. I have an image and I want to change width and height during runtime.</p>
  
  <pre><code>public GameObject image4;
  image4.GetComponent&lt;RectTransform&gt;().rect.Set(0,0,100, 300);
  </code></pre>
  
  <p>which doesn't work. And image4.GetComponent().rect.y is GET only so cannot be changed at runtime.</p>
  
  <p>I've also tried:</p>
  
  <pre><code>image4.transform.localScale.y = 15;
  </code></pre>
  
  <p>which doesn't work either.</p>
  
  <p>what is the proper way to change size at runtime? You can give me an example in either JS or C#, doesn't matter.</p>