how to make an array with sprites unity code example
Example: load array with sprites unity
void Start(){ LoadIcons(); } public Sprite[] Icons; // icons array void LoadIcons(){ object[] loadedIcons = Resources.LoadAll ("Icons",typeof(Sprite)) ; Icons = new Sprite[loadedIcons.Length]; //this for(int x = 0; x< loadedIcons.Length;x++){ Icons [x] = (Sprite)loadedIcons [x]; } //or this //loadedIcons.CopyTo (Icons,0); }