unity add sprite into a Ui Image code example
Example: unity set sprite image from script
Sprite myFruit = Resources.Load("fruits_1", typeof(Sprite)) as Sprite;
Sprite myFruit = Resources.Load("fruits_1", typeof(Sprite)) as Sprite;