Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to change rect transform width or height from unity

How Can I modify the width and height of RectTransform ?

RectTransform rt = gameObjectName.GetComponent (typeof (RectTransform)) as RectTransform;
rt.sizeDelta = new Vector2 (100, 100);
Source by forum.unity.com #
 
PREVIOUS NEXT
Tagged: #change #rect #transform #width #height #unity
ADD COMMENT
Topic
Name
7+9 =