how to change an image in unity inside of a script code example
Example: 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