Search
 
SCRIPT & CODE EXAMPLE
 

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);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to clear console in c# 
Csharp :: hex string to int c# 
Csharp :: unity set object scale 
Csharp :: c# new line in messagebox 
Csharp :: rigidbody2d freeze position 
Csharp :: c# datetime dd/mm/yyy hh:mm:ss 
Csharp :: c# char to int 
Csharp :: Animator.GotoState: State could not be found 
Csharp :: enum loop 
Csharp :: how to move a object in unity c# 
Csharp :: check last character of a string c# 
Csharp :: json stringify c# 
Csharp :: c# set a guid 
Csharp :: c# messagebox 
Csharp :: xamarin button text lowercase 
Csharp :: how to convert angle to vector in c# 
Csharp :: c# log to console 
Csharp :: c# read file into a string 
Csharp :: how to make c# program run cmd commands 
Csharp :: c# get object property value by name 
Csharp :: unity object follow mouse 
Csharp :: unity how to wait for seconds without coroutine 
Csharp :: backcolor c# hexadecimal 
Csharp :: unity open website url 
Csharp :: unity get direction from one point to another 
Csharp :: vuln.c nc mercury.picoctf.net 59616 
Csharp :: c# convert to snake case 
Csharp :: unity list to array 
Csharp :: how to change scenes in unity 
Csharp :: how to add a delay in csharp 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =