Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to chnage the Scale propery of rect tranform unity

// To Change the "Scale" property use localScale, like this
// Change the numbers in the "()" to your choosen scale
public GameObject YourPanel;
YourPanel.GetComponent<RectTransform>().localScale = new Vector3(newWidthUI, newHeightUI, 1);

// If you want to change it in pixels
public GameObject yourUI;
yourUI.GetComponent<RectTransform>().sizeDelta = new Vector2(newWidthUI,newHeightUI);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to change rotate with script unity 
Csharp :: base64 bit string to pdf c# 
Csharp :: system.text.json DeserializeAsync when to use 
Csharp :: how to create a rounded custom panel c# 
Csharp :: backcolor c# hexadecimal 
Csharp :: how to start a coroutine in c# 
Csharp :: unity move character 
Csharp :: c# download file 
Csharp :: c# copy list without reference 
Csharp :: scaffold db ef core 
Csharp :: windows forms iterate through all controls 
Csharp :: minheap c# 
Csharp :: unity rotate vector 
Csharp :: c# random choice 
Csharp :: add tablelayoutpanel dynamicly to winform in c# 
Csharp :: c# check if string is directory 
Csharp :: unity agent walks in place at start 
Csharp :: c# declare inline string array 
Csharp :: c# add guid to array 
Csharp :: c# get binary array from int 
Csharp :: move file from one folder to another c# 
Csharp :: meta keywords tag mvc .net core 
Csharp :: c# reverse a string 
Csharp :: time.timescale 
Csharp :: print in c# unity 
Csharp :: c# regex to find number between parenthesis 
Csharp :: what is data encapsulation c# 
Csharp :: string length c# 
Csharp :: get directory of file c# 
Csharp :: define a vector c# 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =