Texture[] Textures;
int N;//为图片数量
void Awake()
{
StartCoroutine(LoadTexture());
}
IEnumerator LoadTexture()
{
for (int i = 0; i < N; i++)
{
ResourceRequest request = Resources.LoadAsync("***/***_000" + string.Format("{0:D2}", i)); //文件路径
yield return request;
if (request != null)
{
if (request.isDone)
{
Textures[i] = request.asset as Texture;
}
}
}
}