how to import a sprite to unity code example
Example 1: load an image sprite script unity
void Start()
{
spriteArray = Resources.LoadAll<Sprite>("BirdHeroSprite");
}
Example 2: image.sprite unity
Image1.sprite =new Sprite;
void Start()
{
spriteArray = Resources.LoadAll<Sprite>("BirdHeroSprite");
}
Image1.sprite =new Sprite;