using System.Collections; using System.Collections.Generic; using UnityEngine; namespace GameLogic { [System.Serializable] public class TextureEntry { public string Key; // ×ÖµäµÄ¼ü public List Textures; // ×ÖµäµÄÖµ } public class TextureManager : MonoBehaviour { public List m_Texture2ds; void Start() { } public TextureEntry GetTexture(string key) { foreach (var entry in m_Texture2ds) { if (entry.Key == key) { return entry; } } Debug.LogError("Texture not found: " + key); return null; } } }