Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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
 
PREVIOUS NEXT
Tagged: #change #image #code #unity
ADD COMMENT
Topic
Name
7+9 =