Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

how to change a image with code unity

// Change From GameOject
public GameObject GameObjectWithImage;
public Sprite ImageYouWant;
GameObjectWithImage.GetComponent<Image>().sprite = ImageYouWant

// Change From Image
public Image Image;
public Sprite ImageYouWant;
Image.sprite = ImageYouWant
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# loop through datatable 
Csharp :: c# initialize dictionary 
Csharp :: round corners of textbox wpf 
Csharp :: unity textmeshpro 
Csharp :: unity change text color 
Csharp :: c# put string to clipboard 
Csharp :: c# winform remove button border 
Csharp :: unity override 
Csharp :: create new gameobject unity 
Csharp :: Csharp cast string to double 
Csharp :: unity deactive code from code 
Csharp :: remove repeated items in a list unity 
Csharp :: c# difference between break and continue 
Csharp :: c# absolute value 
Csharp :: c# reverse string 
Csharp :: unity destroy object when out of screen 
Csharp :: how to reference text mesh pro unity 
Csharp :: shaking camera in c# 
Csharp :: get values from range entity framework 
Csharp :: c# round to 2 decimal places 
Csharp :: unity rotate around pivot c# 
Csharp :: xml node update attribute value c# 
Csharp :: how to store more data than doublec# 
Csharp :: Directory Entry c# get computer list 
Csharp :: how to find avareage of an array in c# 
Csharp :: unity how to remove a tag 
Csharp :: c# datatable copy selected rows to another table 
Csharp :: c# md5 hash file 
Csharp :: uni valued tree 
Csharp :: SIMPLE HTTP REQUEST C# 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =