using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public Sprite[] mySprites;
}
From the editor, you can put sprites in the array property.
I want to put several large sprites there, like, 20 huge ones. However, only one of the 20 will be used by a SpriteRenderer
at any given moment (I just have them in an array so I can switch easily in the future).
My concern is performance: does having an array containing 20 "Sprite" references imply that Unity will load the texture data of all 20 sprites? Or will Unity only load the data for the sprite that will be used by SpriteRenderer
smartly?