public Sprite GetSpriteByName(string name) { for (int i=0; i<spDataList.Count; i++) { if(spDataList[i].spName == name) { return spDataList[i].sp; } } Debug.LogError("不存在该Sprite"); return null; }