- Home /
Question by
Smaika · Feb 28, 2016 at 01:58 PM ·
c#javascriptscalerecttransformrect
Is it possible to change Rect Transform Scale throw script
Is it possible to change Rect Transform Scale throw script
untitled.png
(29.2 kB)
Comment
Answer by Ali-hatem · Feb 28, 2016 at 02:39 PM
using UnityEngine;
using System.Collections;
public class Rt : MonoBehaviour
{
RectTransform rt;
void Start()
{
rt = GetComponent<RectTransform> ();
rt.localScale = new Vector3 (2,2,1);
}
}