using System.Collections;
using System.Collections.Generic;
using UnityEngine.SceneManagement;
using UnityEngine;
using UnityEngine.UI;
private SpriteRenderer old_sprite_img;
public Sprite new_sprite_img;//USE INSPECTOR TO PUT THE NEW IMG SOURCE
void start()
{
//FIND YOUR OBJECT TO CHANGE THE IMG
object_compoent = GameObject.FindWithTag("your_tag_name");
old_sprite_img = object_compoent.GetComponent<SpriteRenderer>();
old_sprite_img.sprite = new_sprite_img;
}